Chromium Code Reviews| 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..0ca71c72d70b67638a4d7be0a8c8f069e3fdf1fc 100644 |
| --- a/content/browser/renderer_host/input/touch_selection_controller.h |
| +++ b/ui/touch_selection/touch_selection_controller.h |
| @@ -2,29 +2,23 @@ |
| // 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" |
|
mfomitchev
2014/12/01 21:36:24
We only need to import selection_bound.h, not all
mohsen
2014/12/02 05:17:03
We're using a lot from touch_handle.h (e.g. subcla
|
| +#include "ui/touch_selection/ui_touch_selection_export.h" |
| namespace ui { |
| -class MotionEvent; |
| -} |
|
mfomitchev
2014/12/01 21:36:24
I think the convention is no blank line in spots l
mohsen
2014/12/02 05:17:03
Done.
|
| -namespace content { |
| +class MotionEvent; |
| // 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 +34,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 +45,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 +122,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 +144,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_ |