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

Unified Diff: ui/views/widget/root_view.h

Issue 9076002: Initial views touchui Gesture Recognizer support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win release build Created 8 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
« no previous file with comments | « ui/views/widget/native_widget_delegate.h ('k') | ui/views/widget/root_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view.h
diff --git a/ui/views/widget/root_view.h b/ui/views/widget/root_view.h
index 3f372e684b0435df5a7d9b3cd431b5952cb03312..2539676ad5f8826d92ff2e992c08138971984933 100644
--- a/ui/views/widget/root_view.h
+++ b/ui/views/widget/root_view.h
@@ -21,6 +21,7 @@ namespace views {
class Widget;
class GestureManager;
+class GestureRecognizer;
// This is a views-internal API and should not be used externally.
// Widget exposes this object as a View*.
@@ -71,6 +72,9 @@ class VIEWS_EXPORT RootView : public View, public FocusTraversable {
// Provided only for testing:
void SetGestureManagerForTesting(GestureManager* g) { gesture_manager_ = g; }
+ void SetGestureRecognizerForTesting(GestureRecognizer* gr) {
+ gesture_recognizer_ = gr;
+ }
// Focus ---------------------------------------------------------------------
@@ -110,6 +114,7 @@ class VIEWS_EXPORT RootView : public View, public FocusTraversable {
virtual void OnMouseExited(const MouseEvent& event) OVERRIDE;
virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE;
virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event) OVERRIDE;
+ virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE;
virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE;
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
virtual void ReorderChildLayers(ui::Layer* parent_layer) OVERRIDE;
@@ -145,6 +150,10 @@ class VIEWS_EXPORT RootView : public View, public FocusTraversable {
// be applied to the point prior to calling this).
void SetMouseLocationAndFlags(const MouseEvent& event);
+ // Feeds touch event to GestureRecognizer.
+ // Returns true if the event resulted in firing a synthetic event.
+ bool DoGestureProcessing(const TouchEvent& event, ui::TouchStatus status);
+
//////////////////////////////////////////////////////////////////////////////
// Tree operations -----------------------------------------------------------
@@ -179,6 +188,12 @@ class VIEWS_EXPORT RootView : public View, public FocusTraversable {
// The view currently handling touch events.
View* touch_pressed_handler_;
+ // The gesture_recognizer_ for this.
+ GestureRecognizer* gesture_recognizer_;
+
+ // The view currently handling gesture events.
+ View* gesture_handling_view_;
+
// Focus ---------------------------------------------------------------------
// The focus search algorithm.
« no previous file with comments | « ui/views/widget/native_widget_delegate.h ('k') | ui/views/widget/root_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698