diff options
author | rjkroege@google.com <rjkroege@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-08 14:06:10 +0000 |
---|---|---|
committer | rjkroege@google.com <rjkroege@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-08 14:06:10 +0000 |
commit | ad84c8f53a2973e4d752de9fe8c52e3268a867e1 (patch) | |
tree | cb330cc04d3b0dd3a93eca847e367d794310653c /views/view.h | |
parent | 2229e8264e786f5265bf5c0a6265d5aa3dfaf713 (diff) | |
download | chromium_src-ad84c8f53a2973e4d752de9fe8c52e3268a867e1.zip chromium_src-ad84c8f53a2973e4d752de9fe8c52e3268a867e1.tar.gz chromium_src-ad84c8f53a2973e4d752de9fe8c52e3268a867e1.tar.bz2 |
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
Diffstat (limited to 'views/view.h')
-rw-r--r-- | views/view.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/views/view.h b/views/view.h index 293c5c7..2504667 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. |