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

Unified Diff: views/view.h

Issue 3192002: Added entry points to view/View to dispatch and process TouchEvents. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: final changes Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/touchui/gesture_manager.cc ('k') | views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.h
diff --git a/views/view.h b/views/view.h
index 293c5c7143fe77d9e7b46af8d09b1dc3a63fd610..25046678ec1ba4906f9ea8211521970d045ae5d4 100644
--- a/views/view.h
+++ b/views/view.h
@@ -705,6 +705,12 @@ class View : public AcceleratorTarget {
// Default implementation does nothing. Override as needed.
virtual void OnMouseExited(const MouseEvent& event);
+#if defined(TOUCH_UI)
+ // This method is invoked for each touch event. Default implementation
+ // does nothing. Override as needed.
+ virtual bool OnTouchEvent(const TouchEvent& event);
+#endif
+
// Set the MouseHandler for a drag session.
//
// A drag session is a stream of mouse events starting
@@ -712,7 +718,7 @@ class View : public AcceleratorTarget {
// events and finishing with a MouseReleased event.
//
// This method should be only invoked while processing a
- // MouseDragged or MouseReleased event.
+ // MouseDragged or MousePressed event.
//
// All further mouse dragged and mouse up events will be sent
// the MouseHandler, even if it is reparented to another window.
@@ -1160,6 +1166,13 @@ class View : public AcceleratorTarget {
bool ProcessMouseDragged(const MouseEvent& e, DragInfo* drop_info);
void ProcessMouseReleased(const MouseEvent& e, bool canceled);
+#if defined(TOUCH_UI)
+ // RootView will invoke this with incoming TouchEvents. Returns the
+ // the result of OnTouchEvent: true if the event was handled by the
+ // callee.
+ bool ProcessTouchEvent(const TouchEvent& e);
+#endif
+
// Starts a drag and drop operation originating from this view. This invokes
// WriteDragData to write the data and GetDragOperations to determine the
// supported drag operations. When done, OnDragDone is invoked.
« no previous file with comments | « views/touchui/gesture_manager.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698