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

Unified Diff: views/view.h

Issue 6347002: touch: Return an enum from OnTouchEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tests, add a missed case. Created 9 years, 11 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: views/view.h
diff --git a/views/view.h b/views/view.h
index 3c77e03aaf1536b4a6dc88c1a7544016ecd39239..6ef02a8d873b6cdeb6df6c87ce86262554786e97 100644
--- a/views/view.h
+++ b/views/view.h
@@ -133,6 +133,16 @@ class View : public AcceleratorTarget {
APPLY_MIRRORING_TRANSFORMATION
};
+#if defined(TOUCH_UI)
+ enum TouchStatus {
+ TOUCH_STATUS_UNKNOWN = 0,
+ TOUCH_STATUS_START,
+ TOUCH_STATUS_CONTINUE,
+ TOUCH_STATUS_END,
+ TOUCH_STATUS_CANCEL
+ };
+#endif
+
// The view class name.
static char kViewClassName[];
@@ -699,7 +709,7 @@ class View : public AcceleratorTarget {
#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);
+ virtual TouchStatus OnTouchEvent(const TouchEvent& event);
#endif
// Set the MouseHandler for a drag session.
@@ -1159,9 +1169,8 @@ class View : public AcceleratorTarget {
#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);
+ // the result of OnTouchEvent.
+ TouchStatus ProcessTouchEvent(const TouchEvent& e);
#endif
// Starts a drag and drop operation originating from this view. This invokes

Powered by Google App Engine
This is Rietveld 408576698