Added entry points to view/View to dispatch and process TouchEvents.
This change is part of a series of changes to bring TouchEvent
processing to views.
BUG=na
TESTED=compiled with and without touchui
Review URL: http://codereview.chromium.org/3192002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58823 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/views/view.h b/views/view.h
index 293c5c71..25046678 100644
--- a/views/view.h
+++ b/views/view.h
@@ -705,6 +705,12 @@
// 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 @@
// 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 @@
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.