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

Unified Diff: content/browser/renderer_host/input/motion_event_android.h

Issue 348813002: Extend MotionEvent to have tool type and button state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/motion_event_android.h
diff --git a/content/browser/renderer_host/input/motion_event_android.h b/content/browser/renderer_host/input/motion_event_android.h
index 0362b0454e997f33d268e6fbd6186bc403ca7ce9..aa3e08241aac29e7c711aaf7c610524e3adbd93e 100644
--- a/content/browser/renderer_host/input/motion_event_android.h
+++ b/content/browser/renderer_host/input/motion_event_android.h
@@ -39,7 +39,10 @@ class MotionEventAndroid : public ui::MotionEvent {
jfloat touch_major_0_pixels,
jfloat touch_major_1_pixels,
jfloat raw_pos_x_pixels,
- jfloat raw_pos_y_pixels);
+ jfloat raw_pos_y_pixels,
+ jint android_tool_type_0,
+ jint android_tool_type_1,
+ jint android_button_state);
virtual ~MotionEventAndroid();
// ui::MotionEvent methods.
@@ -64,6 +67,8 @@ class MotionEventAndroid : public ui::MotionEvent {
size_t historical_index) const OVERRIDE;
virtual float GetHistoricalY(size_t pointer_index,
size_t historical_index) const OVERRIDE;
+ virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE;
+ virtual int GetButtonState() const OVERRIDE;
virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE;
virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE;
@@ -110,6 +115,8 @@ class MotionEventAndroid : public ui::MotionEvent {
int cached_pointer_ids_[MAX_POINTERS_TO_CACHE];
float cached_touch_majors_[MAX_POINTERS_TO_CACHE];
gfx::Vector2dF cached_raw_position_offset_;
+ ToolType cached_tool_types_[MAX_POINTERS_TO_CACHE];
+ int cached_button_state_;
// Used to convert pixel coordinates from the Java-backed MotionEvent to
// DIP coordinates cached/returned by the MotionEventAndroid.
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/renderer_host/input/motion_event_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698