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

Unified Diff: ui/events/gesture_detection/gesture_provider.cc

Issue 2054193002: Android mouse events shouldn't appear as TouchEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a test, etc. Created 4 years, 1 month 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: ui/events/gesture_detection/gesture_provider.cc
diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc
index b7cdb24bdd5fb685af84f3b4a29538ccdfb21286..f5f26981d6404bd9c9f4f9dda0de95fb4d20c04a 100644
--- a/ui/events/gesture_detection/gesture_provider.cc
+++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -42,6 +42,16 @@ const char* GetMotionEventActionName(MotionEvent::Action action) {
return "ACTION_CANCEL";
case MotionEvent::ACTION_MOVE:
return "ACTION_MOVE";
+ case MotionEvent::ACTION_HOVER_ENTER:
+ return "ACTION_HOVER_ENTER";
+ case MotionEvent::ACTION_HOVER_EXIT:
+ return "ACTION_HOVER_EXIT";
+ case MotionEvent::ACTION_HOVER_MOVE:
+ return "ACTION_HOVER_MOVE";
+ case MotionEvent::ACTION_BUTTON_PRESS:
+ return "ACTION_BUTTON_PRESS";
+ case MotionEvent::ACTION_BUTTON_RELEASE:
+ return "ACTION_BUTTON_RELEASE";
}
return "";
}
@@ -853,6 +863,11 @@ void GestureProvider::OnTouchEventHandlingBegin(const MotionEvent& event) {
case MotionEvent::ACTION_MOVE:
break;
case MotionEvent::ACTION_NONE:
+ case MotionEvent::ACTION_HOVER_ENTER:
+ case MotionEvent::ACTION_HOVER_EXIT:
+ case MotionEvent::ACTION_HOVER_MOVE:
+ case MotionEvent::ACTION_BUTTON_PRESS:
+ case MotionEvent::ACTION_BUTTON_RELEASE:
NOTREACHED();
break;
}
@@ -881,6 +896,11 @@ void GestureProvider::OnTouchEventHandlingEnd(const MotionEvent& event) {
case MotionEvent::ACTION_MOVE:
break;
case MotionEvent::ACTION_NONE:
+ case MotionEvent::ACTION_HOVER_ENTER:
+ case MotionEvent::ACTION_HOVER_EXIT:
+ case MotionEvent::ACTION_HOVER_MOVE:
+ case MotionEvent::ACTION_BUTTON_PRESS:
+ case MotionEvent::ACTION_BUTTON_RELEASE:
NOTREACHED();
break;
}
« no previous file with comments | « ui/events/gesture_detection/gesture_event_data_packet.cc ('k') | ui/events/gesture_detection/motion_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698