Index: views/view.h |
diff --git a/views/view.h b/views/view.h |
index 3c77e03aaf1536b4a6dc88c1a7544016ecd39239..6889a7fe83775e2a3559617a7e9b2c28a644d0f0 100644 |
--- a/views/view.h |
+++ b/views/view.h |
@@ -78,7 +78,6 @@ class ContextMenuController { |
// DragController is responsible for writing drag data for a view, as well as |
// supplying the supported drag operations. Use DragController if you don't |
// want to subclass. |
- |
class DragController { |
public: |
// Writes the data for the drag. |
@@ -101,6 +100,16 @@ class DragController { |
virtual ~DragController() {} |
}; |
+#if defined(TOUCH_UI) |
+// TouchEventObserver observes the touch event for the completion of a touch |
+// sequence. |
+class TouchEventObserver { |
+ public: |
+ // Invoked when a touch sequence ends. |
+ virtual void OnTouchSequenceEnd() = 0; |
+}; |
+#endif |
+ |
///////////////////////////////////////////////////////////////////////////// |
// |
// View class |
@@ -1119,6 +1128,12 @@ class View : public AcceleratorTarget { |
// even though it may not be normally focusable. |
bool accessibility_focusable_; |
+#if defined(TOUCH_UI) |
+ // The touch event handler should notify the observer when a touch-sequence |
+ // completely ends. |
+ TouchEventObserver* touch_event_observer_; |
+#endif |
+ |
private: |
friend class RootView; |
friend class FocusManager; |
@@ -1162,6 +1177,11 @@ class View : public AcceleratorTarget { |
// the result of OnTouchEvent: true if the event was handled by the |
// callee. |
bool ProcessTouchEvent(const TouchEvent& e); |
+ |
+ // Set the touch event observer. |
+ void set_touch_event_observer(TouchEventObserver* observer) { |
+ touch_event_observer_ = observer; |
+ } |
#endif |
// Starts a drag and drop operation originating from this view. This invokes |