Index: ui/touch_selection/touch_selection_draggable.h |
diff --git a/ui/touch_selection/touch_selection_draggable.h b/ui/touch_selection/touch_selection_draggable.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..26c2f0022b4dfb48d00a843318625823c5ac66fc |
--- /dev/null |
+++ b/ui/touch_selection/touch_selection_draggable.h |
@@ -0,0 +1,35 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_TOUCH_SELECTION_DRAG_DRAGGABLE_H_ |
+#define UI_TOUCH_SELECTION_DRAG_DRAGGABLE_H_ |
+ |
+#include "ui/gfx/geometry/point_f.h" |
+#include "ui/touch_selection/ui_touch_selection_export.h" |
+ |
+namespace ui { |
+ |
+class MotionEvent; |
+class TouchSelectionDraggable; |
+ |
+// Interface through which TouchSelectionDraggable manipulates the selection. |
+class UI_TOUCH_SELECTION_EXPORT TouchSelectionDraggableClient { |
+ public: |
+ virtual ~TouchSelectionDraggableClient() {} |
+ virtual void OnDragBegin(const TouchSelectionDraggable& draggable, |
+ const gfx::PointF& start_position) = 0; |
+ virtual void OnDragUpdate(const TouchSelectionDraggable& draggable, |
+ const gfx::PointF& new_position) = 0; |
+ virtual void OnDragEnd(const TouchSelectionDraggable& draggable) = 0; |
+}; |
+ |
+// Generic interface for entities that manipulate the selection via dragging. |
+class UI_TOUCH_SELECTION_EXPORT TouchSelectionDraggable { |
+ protected: |
+ virtual ~TouchSelectionDraggable() {} |
mfomitchev
2015/04/23 21:05:53
Any reason not to add WillHandleTouchEvent to this
jdduke (slow)
2015/04/27 20:24:25
Hmm, but what functional purpose would it serve? W
|
+}; |
+ |
+} // namespace ui |
+ |
+#endif // UI_TOUCH_SELECTION_DRAG_DRAGGABLE_H_ |