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

Unified Diff: ui/touch_selection/touch_selection_controller.h

Issue 759433002: Reland: Move TouchSelectionController from content to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Excluded ui/touch_selection from Windows GN build Created 6 years 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/touch_selection/touch_handle_unittest.cc ('k') | ui/touch_selection/touch_selection_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ui/touch_selection/touch_handle_unittest.cc ('k') | ui/touch_selection/touch_selection_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698