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

Side by Side Diff: ui/events/android/motion_event_android.h

Issue 2202033002: ui: Remove unneeded RegisterNatives() call on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jnireg1
Patch Set: rebase, unused headers Created 4 years, 4 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
« no previous file with comments | « ui/events/android/key_event_utils.cc ('k') | ui/events/android/motion_event_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #ifndef UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_ 6 #ifndef UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_
7 #define UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_ 7 #define UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_
8 8
9 #include <jni.h> 9 #include <jni.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 float GetHistoricalTouchMajor(size_t pointer_index, 85 float GetHistoricalTouchMajor(size_t pointer_index,
86 size_t historical_index) const override; 86 size_t historical_index) const override;
87 float GetHistoricalX(size_t pointer_index, 87 float GetHistoricalX(size_t pointer_index,
88 size_t historical_index) const override; 88 size_t historical_index) const override;
89 float GetHistoricalY(size_t pointer_index, 89 float GetHistoricalY(size_t pointer_index,
90 size_t historical_index) const override; 90 size_t historical_index) const override;
91 ToolType GetToolType(size_t pointer_index) const override; 91 ToolType GetToolType(size_t pointer_index) const override;
92 int GetButtonState() const override; 92 int GetButtonState() const override;
93 int GetFlags() const override; 93 int GetFlags() const override;
94 94
95 static bool RegisterMotionEventAndroid(JNIEnv* env);
96
97 private: 95 private:
98 struct CachedPointer; 96 struct CachedPointer;
99 97
100 float ToDips(float pixels) const; 98 float ToDips(float pixels) const;
101 CachedPointer FromAndroidPointer(const Pointer& pointer) const; 99 CachedPointer FromAndroidPointer(const Pointer& pointer) const;
102 100
103 // Cache pointer coords, id's and major lengths for the most common 101 // Cache pointer coords, id's and major lengths for the most common
104 // touch-related scenarios, i.e., scrolling and pinching. This prevents 102 // touch-related scenarios, i.e., scrolling and pinching. This prevents
105 // redundant JNI fetches for the same bits. 103 // redundant JNI fetches for the same bits.
106 enum { MAX_POINTERS_TO_CACHE = 2 }; 104 enum { MAX_POINTERS_TO_CACHE = 2 };
(...skipping 26 matching lines...) Expand all
133 131
134 // A unique identifier for the Android motion event. 132 // A unique identifier for the Android motion event.
135 const uint32_t unique_event_id_; 133 const uint32_t unique_event_id_;
136 134
137 DISALLOW_COPY_AND_ASSIGN(MotionEventAndroid); 135 DISALLOW_COPY_AND_ASSIGN(MotionEventAndroid);
138 }; 136 };
139 137
140 } // namespace content 138 } // namespace content
141 139
142 #endif // UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_ 140 #endif // UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_
OLDNEW
« no previous file with comments | « ui/events/android/key_event_utils.cc ('k') | ui/events/android/motion_event_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698