Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: ui/base/touch/touch_device.h

Issue 2301073002: Optimization: avoid making 4 JNI calls to get touch device attributes. (Closed)
Patch Set: Fix windows compile issues Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_TOUCH_TOUCH_DEVICE_H_ 5 #ifndef UI_BASE_TOUCH_TOUCH_DEVICE_H_
6 #define UI_BASE_TOUCH_TOUCH_DEVICE_H_ 6 #define UI_BASE_TOUCH_TOUCH_DEVICE_H_
7 7
8 #include <tuple>
9
8 #include "build/build_config.h" 10 #include "build/build_config.h"
9 #include "ui/base/ui_base_export.h" 11 #include "ui/base/ui_base_export.h"
10 12
11 #if defined(OS_ANDROID) 13 #if defined(OS_ANDROID)
12 #include <jni.h> 14 #include <jni.h>
13 #endif 15 #endif
14 16
15 // TODO(mustaq@chromium.org): This covers more than just touches. Rename to 17 // TODO(mustaq@chromium.org): This covers more than just touches. Rename to
16 // input_device? crbug.com/438794 18 // input_device? crbug.com/438794
17 19
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.base 55 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.base
54 // GENERATED_JAVA_PREFIX_TO_STRIP: HOVER_TYPE_ 56 // GENERATED_JAVA_PREFIX_TO_STRIP: HOVER_TYPE_
55 enum HoverType { 57 enum HoverType {
56 HOVER_TYPE_NONE = 1 << 0, 58 HOVER_TYPE_NONE = 1 << 0,
57 HOVER_TYPE_FIRST = HOVER_TYPE_NONE, 59 HOVER_TYPE_FIRST = HOVER_TYPE_NONE,
58 HOVER_TYPE_ON_DEMAND = 1 << 1, 60 HOVER_TYPE_ON_DEMAND = 1 << 1,
59 HOVER_TYPE_HOVER = 1 << 2, 61 HOVER_TYPE_HOVER = 1 << 2,
60 HOVER_TYPE_LAST = HOVER_TYPE_HOVER 62 HOVER_TYPE_LAST = HOVER_TYPE_HOVER
61 }; 63 };
62 64
63 UI_BASE_EXPORT int GetAvailablePointerTypes(); 65 UI_BASE_EXPORT std::pair<int, int> GetAvailablePointerAndHoverTypes();
64 UI_BASE_EXPORT PointerType GetPrimaryPointerType(); 66 UI_BASE_EXPORT PointerType GetPrimaryPointerType(int available_pointer_types);
65 UI_BASE_EXPORT int GetAvailableHoverTypes(); 67 UI_BASE_EXPORT HoverType GetPrimaryHoverType(int available_hover_types);
66 UI_BASE_EXPORT HoverType GetPrimaryHoverType();
67 68
68 } // namespace ui 69 } // namespace ui
69 70
70 #endif // UI_BASE_TOUCH_TOUCH_DEVICE_H_ 71 #endif // UI_BASE_TOUCH_TOUCH_DEVICE_H_
OLDNEW
« no previous file with comments | « ui/android/java/src/org/chromium/ui/base/TouchDevice.java ('k') | ui/base/touch/touch_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698