Index: ui/touch_selection/touch_selection_controller.h |
diff --git a/content/browser/renderer_host/input/touch_selection_controller.h b/ui/touch_selection/touch_selection_controller.h |
similarity index 83% |
rename from content/browser/renderer_host/input/touch_selection_controller.h |
rename to ui/touch_selection/touch_selection_controller.h |
index 13b06892618726299044044e6a2c863eeacbde44..2bcefbd20542c1a12477ccb93ed6eec25fc7a8ea 100644 |
--- a/content/browser/renderer_host/input/touch_selection_controller.h |
+++ b/ui/touch_selection/touch_selection_controller.h |
@@ -2,29 +2,22 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_ |
-#define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_ |
+#ifndef UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ |
+#define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ |
-#include "cc/output/viewport_selection_bound.h" |
-#include "content/browser/renderer_host/input/selection_event_type.h" |
-#include "content/browser/renderer_host/input/touch_handle.h" |
-#include "content/common/content_export.h" |
+#include "ui/base/touch/selection_bound.h" |
#include "ui/gfx/geometry/point_f.h" |
#include "ui/gfx/geometry/rect_f.h" |
- |
-namespace blink { |
-class WebInputEvent; |
-} |
+#include "ui/touch_selection/selection_event_type.h" |
+#include "ui/touch_selection/touch_handle.h" |
+#include "ui/touch_selection/ui_touch_selection_export.h" |
namespace ui { |
class MotionEvent; |
-} |
- |
-namespace content { |
// Interface through which |TouchSelectionController| issues selection-related |
// commands, notifications and requests. |
-class CONTENT_EXPORT TouchSelectionControllerClient { |
+class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerClient { |
public: |
virtual ~TouchSelectionControllerClient() {} |
@@ -40,7 +33,8 @@ class CONTENT_EXPORT TouchSelectionControllerClient { |
}; |
// Controller for manipulating text selection via touch input. |
-class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient { |
+class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
+ : public TouchHandleClient { |
public: |
TouchSelectionController(TouchSelectionControllerClient* client, |
base::TimeDelta tap_timeout, |
@@ -50,13 +44,13 @@ class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient { |
// To be called when the selection bounds have changed. |
// Note that such updates will trigger handle updates only if preceded |
// by an appropriate call to allow automatic showing. |
- void OnSelectionBoundsChanged(const cc::ViewportSelectionBound& start, |
- const cc::ViewportSelectionBound& end); |
+ void OnSelectionBoundsChanged(const SelectionBound& start, |
+ const SelectionBound& end); |
// Allows touch-dragging of the handle. |
// Returns true iff the event was consumed, in which case the caller should |
// cease further handling of the event. |
- bool WillHandleTouchEvent(const ui::MotionEvent& event); |
+ bool WillHandleTouchEvent(const MotionEvent& event); |
// To be called before forwarding a tap event. This allows automatically |
// showing the insertion handle from subsequent bounds changes. |
@@ -127,8 +121,8 @@ class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient { |
InputEventType response_pending_input_event_; |
- cc::ViewportSelectionBound start_; |
- cc::ViewportSelectionBound end_; |
+ SelectionBound start_; |
+ SelectionBound end_; |
TouchHandleOrientation start_orientation_; |
TouchHandleOrientation end_orientation_; |
@@ -149,6 +143,6 @@ class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient { |
DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); |
}; |
-} // namespace content |
+} // namespace ui |
-#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_ |
+#endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ |