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

Side by Side Diff: ui/touch_selection/touch_selection_controller_aura.h

Issue 829913004: WIP: Plumbing through text selection granularity control support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unified_text_selection_diff
Patch Set: Missing file. Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ 5 #ifndef UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_
6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ 6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_
7 7
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "ui/events/event_handler.h" 9 #include "ui/events/event_handler.h"
10 #include "ui/touch_selection/touch_selection_controller.h" 10 #include "ui/touch_selection/touch_selection_controller.h"
11 #include "ui/touch_selection/touch_selection_menu_runner.h" 11 #include "ui/touch_selection/touch_selection_menu_runner.h"
12 12
13 namespace aura { 13 namespace aura {
14 class Window; 14 class Window;
15 } 15 }
16 16
17 namespace ui { 17 namespace ui {
18 class MotionEventAura; 18 class MotionEventAura;
19 class TouchEvent; 19 class TouchEvent;
20 20
21 //... 21 //...
22 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAuraClient { 22 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAuraClient {
23 public: 23 public:
24 virtual ~TouchSelectionControllerAuraClient() {}; 24 virtual ~TouchSelectionControllerAuraClient() {};
25 25
26 virtual void MoveCaret(const gfx::PointF& position) = 0; 26 virtual void MoveCaret(const gfx::PointF& position) = 0;
27 virtual void MoveRangeSelectionExtent(const gfx::PointF& extent) = 0; 27 virtual void MoveRangeSelectionExtent(
28 const gfx::PointF& extent,
29 ui::TextSelectionGranularity granularity) = 0;
28 virtual void SelectBetweenCoordinates(const gfx::PointF& base, 30 virtual void SelectBetweenCoordinates(const gfx::PointF& base,
29 const gfx::PointF& extent) = 0; 31 const gfx::PointF& extent) = 0;
30 virtual aura::Window* GetParentWindow() const = 0; 32 virtual aura::Window* GetParentWindow() const = 0;
31 virtual bool IsCommandIdEnabled(int command_id) const = 0; 33 virtual bool IsCommandIdEnabled(int command_id) const = 0;
32 virtual void ExecuteCommand(int command_id, int event_flags) = 0; 34 virtual void ExecuteCommand(int command_id, int event_flags) = 0;
33 virtual void OpenContextMenu(const gfx::PointF& point) = 0; 35 virtual void OpenContextMenu(const gfx::PointF& point) = 0;
34 virtual gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const = 0; 36 virtual gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const = 0;
35 }; 37 };
36 38
37 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAura 39 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAura
(...skipping 22 matching lines...) Expand all
60 private: 62 private:
61 gfx::Rect GetAnchorRect() const; 63 gfx::Rect GetAnchorRect() const;
62 void QuickMenuTimerFired(); 64 void QuickMenuTimerFired();
63 void UpdateQuickMenu(); 65 void UpdateQuickMenu();
64 bool IsQuickMenuAllowed() const; 66 bool IsQuickMenuAllowed() const;
65 67
66 // Overriden from TouchSelectionControllerClient. 68 // Overriden from TouchSelectionControllerClient.
67 bool SupportsAnimation() const override; 69 bool SupportsAnimation() const override;
68 void SetNeedsAnimate() override; 70 void SetNeedsAnimate() override;
69 void MoveCaret(const gfx::PointF& position) override; 71 void MoveCaret(const gfx::PointF& position) override;
70 void MoveRangeSelectionExtent(const gfx::PointF& extent) override; 72 void MoveRangeSelectionExtent(
73 const gfx::PointF& extent,
74 ui::TextSelectionGranularity granularity) override;
71 void SelectBetweenCoordinates(const gfx::PointF& base, 75 void SelectBetweenCoordinates(const gfx::PointF& base,
72 const gfx::PointF& extent) override; 76 const gfx::PointF& extent) override;
73 void OnSelectionEvent(SelectionEventType event, 77 void OnSelectionEvent(SelectionEventType event,
74 const gfx::PointF& position) override; 78 const gfx::PointF& position) override;
75 scoped_ptr<TouchHandleDrawable> CreateDrawable() override; 79 scoped_ptr<TouchHandleDrawable> CreateDrawable() override;
76 80
77 // Overriden from TouchSelectionMenuClient. 81 // Overriden from TouchSelectionMenuClient.
78 bool IsCommandIdEnabled(int command_id) const override; 82 bool IsCommandIdEnabled(int command_id) const override;
79 void ExecuteCommand(int command_id, int event_flags) override; 83 void ExecuteCommand(int command_id, int event_flags) override;
80 void OpenContextMenu() override; 84 void OpenContextMenu() override;
(...skipping 10 matching lines...) Expand all
91 bool scroll_in_progress_; 95 bool scroll_in_progress_;
92 bool overscroll_in_progress_; 96 bool overscroll_in_progress_;
93 bool handle_drag_in_progress_; 97 bool handle_drag_in_progress_;
94 98
95 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerAura); 99 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerAura);
96 }; 100 };
97 101
98 } // namespace ui 102 } // namespace ui
99 103
100 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ 104 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_
OLDNEW
« no previous file with comments | « ui/touch_selection/touch_selection_controller.cc ('k') | ui/touch_selection/touch_selection_controller_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698