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

Unified Diff: ui/base/touch/touch_editing_controller.h

Issue 12224133: Move touch_selection_controller interface to ui/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 10 months 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 | « no previous file | ui/base/touch/touch_editing_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/touch/touch_editing_controller.h
diff --git a/ui/views/touchui/touch_selection_controller.h b/ui/base/touch/touch_editing_controller.h
similarity index 66%
rename from ui/views/touchui/touch_selection_controller.h
rename to ui/base/touch/touch_editing_controller.h
index a9a6338025d3bb87239261f1d87537f1b6c4205f..e6473bd853826a03817e160b50e66a326b487329 100644
--- a/ui/views/touchui/touch_selection_controller.h
+++ b/ui/base/touch/touch_editing_controller.h
@@ -1,33 +1,43 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 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_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_H_
-#define UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_H_
+#ifndef UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_
+#define UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_
#include "ui/base/models/simple_menu_model.h"
#include "ui/gfx/point.h"
-#include "ui/views/view.h"
+#include "ui/gfx/rect.h"
-namespace views {
+namespace ui {
-// An interface implemented by a View that has text that can be selected.
-class VIEWS_EXPORT TouchSelectionClientView
- : public View,
- public ui::SimpleMenuModel::Delegate {
+// An interface implemented by a View that has text that can be selected/edited
+// using touch.
+class UI_EXPORT TouchSelectionClientView
sadrul 2013/02/13 00:26:56 Is there going to be any non-views implementation
varunjain 2013/02/13 00:37:15 No non-views implementations. However, the View pr
varunjain 2013/02/13 00:52:12 Sorry.. I make mistake. RWHVA will implement this
+ : public ui::SimpleMenuModel::Delegate {
public:
// Select everything between start and end (points are in view's local
// coordinate system). |start| is the logical start and |end| is the logical
// end of selection. Visually, |start| may lie after |end|.
virtual void SelectRect(const gfx::Point& start, const gfx::Point& end) = 0;
+ // Gets the bounds of the client view in parent's coordinates.
+ virtual const gfx::Rect& GetBounds() = 0;
+
+ // Gets the NativeView hosting the client.
+ virtual gfx::NativeView GetNativeView() = 0;
+
+ // Converts a point to/from screen coordinates from/to client view.
+ virtual void ConvertPointToScreen(gfx::Point* point) = 0;
+ virtual void ConvertPointFromScreen(gfx::Point* point) = 0;
+
protected:
virtual ~TouchSelectionClientView() {}
};
// This defines the callback interface for other code to be notified of changes
// in the state of a TouchSelectionClientView.
-class VIEWS_EXPORT TouchSelectionController {
+class UI_EXPORT TouchSelectionController {
public:
virtual ~TouchSelectionController() {}
@@ -52,4 +62,4 @@ class VIEWS_EXPORT TouchSelectionController {
} // namespace views
-#endif // UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_H_
+#endif // UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_
« no previous file with comments | « no previous file | ui/base/touch/touch_editing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698