view_configuration.h revision a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7
1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// found in the LICENSE file.
4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
5a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#ifndef UI_GFX_ANDROID_VIEW_CONFIGURATION_H_
6a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#define UI_GFX_ANDROID_VIEW_CONFIGURATION_H_
7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include <jni.h>
9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
10a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#include "ui/gfx/gfx_export.h"
11a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
12a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)namespace gfx {
13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Provides access to Android's ViewConfiguration for gesture-related constants.
15a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)class GFX_EXPORT ViewConfiguration {
16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) public:
17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  static int GetDoubleTapTimeoutInMs();
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  static int GetLongPressTimeoutInMs();
19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  static int GetTapTimeoutInMs();
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  static int GetMaximumFlingVelocityInPixelsPerSecond();
22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  static int GetMinimumFlingVelocityInPixelsPerSecond();
23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
24a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  static int GetTouchSlopInPixels();
25a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)
26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // Registers methods with JNI and returns true if succeeded.
27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  static bool RegisterViewConfiguration(JNIEnv* env);
28f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)};
29f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
30a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)}  // namespace gfx
31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
32a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#endif  // UI_GFX_ANDROID_VIEW_CONFIGURATION_H_
33