summaryrefslogtreecommitdiffstats
path: root/ui/base/touch
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-14 21:58:35 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-14 21:58:35 +0000
commit21f401282162d9d237cc142dddabb9bbf26295da (patch)
treecbcf8650ca7976cd89bb5894d56d997e77363670 /ui/base/touch
parentb6b05648b69d6aa57c4a2922a4cf649525e0f46b (diff)
downloadchromium_src-21f401282162d9d237cc142dddabb9bbf26295da.zip
chromium_src-21f401282162d9d237cc142dddabb9bbf26295da.tar.gz
chromium_src-21f401282162d9d237cc142dddabb9bbf26295da.tar.bz2
Reverting as it caused compile failures on linux chromium OS ASAN
Revert 182542 - Enable touch editing controller for views textfields behind a flag. BUG=115237 Review URL: https://chromiumcodereview.appspot.com/12210154 TBR=varunjain@chromium.org Review URL: https://chromiumcodereview.appspot.com/12259033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/touch')
-rw-r--r--ui/base/touch/touch_editing_controller.cc12
-rw-r--r--ui/base/touch/touch_editing_controller.h41
2 files changed, 12 insertions, 41 deletions
diff --git a/ui/base/touch/touch_editing_controller.cc b/ui/base/touch/touch_editing_controller.cc
index 1b84ed9..8afb740 100644
--- a/ui/base/touch/touch_editing_controller.cc
+++ b/ui/base/touch/touch_editing_controller.cc
@@ -6,21 +6,9 @@
namespace ui {
-namespace {
-TouchSelectionControllerFactory* g_shared_instance = NULL;
-} // namespace
-
TouchSelectionController* TouchSelectionController::create(
TouchEditable* client_view) {
- if (g_shared_instance)
- return g_shared_instance->create(client_view);
return NULL;
}
-// static
-void TouchSelectionControllerFactory::SetInstance(
- TouchSelectionControllerFactory* instance) {
- g_shared_instance = instance;
-}
-
} // namespace ui
diff --git a/ui/base/touch/touch_editing_controller.h b/ui/base/touch/touch_editing_controller.h
index e7985ce..999c2ad 100644
--- a/ui/base/touch/touch_editing_controller.h
+++ b/ui/base/touch/touch_editing_controller.h
@@ -20,17 +20,6 @@ class UI_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate {
// end of selection. Visually, |start| may lie after |end|.
virtual void SelectRect(const gfx::Point& start, const gfx::Point& end) = 0;
- // Gets the end points of the current selection. The end points p1 and p2 must
- // be the cursor rect for the start and end of selection:
- // ____________________________________
- // | textfield with |selected text| |
- // ------------------------------------
- // ^p1 ^p2
- //
- // p1 should be the logical start and p2 the logical end of selection. Hence,
- // visually, p1 could be to the right of p2 in the figure above.
- virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) = 0;
-
// Gets the bounds of the client view in parent's coordinates.
virtual const gfx::Rect& GetBounds() = 0;
@@ -41,13 +30,6 @@ class UI_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate {
virtual void ConvertPointToScreen(gfx::Point* point) = 0;
virtual void ConvertPointFromScreen(gfx::Point* point) = 0;
- // Returns true if the editable draws its own handles (hence, the
- // TouchSelectionController need not draw handles).
- virtual bool DrawsHandles() = 0;
-
- // Tells the editable to open context menu.
- virtual void OpenContextMenu(const gfx::Point anchor) = 0;
-
protected:
virtual ~TouchEditable() {}
};
@@ -62,18 +44,19 @@ class UI_EXPORT TouchSelectionController {
static TouchSelectionController* create(
TouchEditable* client_view);
- // Notifies the controller that the selection has changed.
- virtual void SelectionChanged() = 0;
-};
-
-class UI_EXPORT TouchSelectionControllerFactory {
- public:
- static void SetInstance(TouchSelectionControllerFactory* instance);
-
- virtual TouchSelectionController* create(TouchEditable* client_view) = 0;
+ // Notification that the text selection in TouchEditable has
+ // changed. p1 and p2 are lower corners of the start and end of selection:
+ // ____________________________________
+ // | textfield with |selected text| |
+ // ------------------------------------
+ // ^p1 ^p2
+ //
+ // p1 is always the start and p2 is always the end of selection. Hence,
+ // p1 could be to the right of p2 in the figure above.
+ virtual void SelectionChanged(const gfx::Point& p1, const gfx::Point& p2) = 0;
- protected:
- virtual ~TouchSelectionControllerFactory() {}
+ // Notification that the TouchEditable has lost focus.
+ virtual void ClientViewLostFocus() = 0;
};
} // namespace views