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

Side by Side Diff: content/browser/renderer_host/input/touch_selection_controller.h

Issue 657803002: Update touch selection to only modify one selection point at a time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_
7 7
8 #include "cc/output/viewport_selection_bound.h" 8 #include "cc/output/viewport_selection_bound.h"
9 #include "content/browser/renderer_host/input/selection_event_type.h" 9 #include "content/browser/renderer_host/input/selection_event_type.h"
10 #include "content/browser/renderer_host/input/touch_handle.h" 10 #include "content/browser/renderer_host/input/touch_handle.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // Interface through which |TouchSelectionController| issues selection-related 25 // Interface through which |TouchSelectionController| issues selection-related
26 // commands, notifications and requests. 26 // commands, notifications and requests.
27 class CONTENT_EXPORT TouchSelectionControllerClient { 27 class CONTENT_EXPORT TouchSelectionControllerClient {
28 public: 28 public:
29 virtual ~TouchSelectionControllerClient() {} 29 virtual ~TouchSelectionControllerClient() {}
30 30
31 virtual bool SupportsAnimation() const = 0; 31 virtual bool SupportsAnimation() const = 0;
32 virtual void SetNeedsAnimate() = 0; 32 virtual void SetNeedsAnimate() = 0;
33 virtual void MoveCaret(const gfx::PointF& position) = 0; 33 virtual void MoveCaret(const gfx::PointF& position) = 0;
34 virtual void MoveSelectionExtent(const gfx::PointF& position) = 0;
34 virtual void SelectBetweenCoordinates(const gfx::PointF& start, 35 virtual void SelectBetweenCoordinates(const gfx::PointF& start,
jdduke (slow) 2014/10/15 15:46:07 While you're digging around here, maybe we could r
christiank 2014/10/17 14:33:05 Sure, makes sense.
35 const gfx::PointF& end) = 0; 36 const gfx::PointF& end) = 0;
36 virtual void OnSelectionEvent(SelectionEventType event, 37 virtual void OnSelectionEvent(SelectionEventType event,
37 const gfx::PointF& position) = 0; 38 const gfx::PointF& position) = 0;
38 virtual scoped_ptr<TouchHandleDrawable> CreateDrawable() = 0; 39 virtual scoped_ptr<TouchHandleDrawable> CreateDrawable() = 0;
39 }; 40 };
40 41
41 // Controller for manipulating text selection via touch input. 42 // Controller for manipulating text selection via touch input.
42 class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient { 43 class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient {
43 public: 44 public:
44 TouchSelectionController(TouchSelectionControllerClient* client, 45 TouchSelectionController(TouchSelectionControllerClient* client,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 cc::ViewportSelectionBound end_; 127 cc::ViewportSelectionBound end_;
127 TouchHandleOrientation start_orientation_; 128 TouchHandleOrientation start_orientation_;
128 TouchHandleOrientation end_orientation_; 129 TouchHandleOrientation end_orientation_;
129 130
130 scoped_ptr<TouchHandle> insertion_handle_; 131 scoped_ptr<TouchHandle> insertion_handle_;
131 bool is_insertion_active_; 132 bool is_insertion_active_;
132 bool activate_insertion_automatically_; 133 bool activate_insertion_automatically_;
133 134
134 scoped_ptr<TouchHandle> start_selection_handle_; 135 scoped_ptr<TouchHandle> start_selection_handle_;
135 scoped_ptr<TouchHandle> end_selection_handle_; 136 scoped_ptr<TouchHandle> end_selection_handle_;
136 gfx::PointF fixed_handle_position_;
137 bool is_selection_active_; 137 bool is_selection_active_;
138 bool activate_selection_automatically_; 138 bool activate_selection_automatically_;
139 139
140 bool selection_empty_; 140 bool selection_empty_;
141 bool selection_editable_; 141 bool selection_editable_;
142 142
143 bool temporarily_hidden_; 143 bool temporarily_hidden_;
144 144
145 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); 145 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController);
146 }; 146 };
147 147
148 } // namespace content 148 } // namespace content
149 149
150 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_ 150 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698