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

Side by Side Diff: ui/views/selection_controller.h

Issue 2379993005: Label selection experiment (Closed)
Patch Set: -- Created 4 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
« no previous file with comments | « ui/views/examples/label_example.cc ('k') | ui/views/selection_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_VIEWS_SELECTION_CONTROLLER_H_ 5 #ifndef UI_VIEWS_SELECTION_CONTROLLER_H_
6 #define UI_VIEWS_SELECTION_CONTROLLER_H_ 6 #define UI_VIEWS_SELECTION_CONTROLLER_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "ui/gfx/geometry/point.h" 10 #include "ui/gfx/geometry/point.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // SelectionController. 85 // SelectionController.
86 class VIEWS_EXPORT SelectionController::Delegate { 86 class VIEWS_EXPORT SelectionController::Delegate {
87 public: 87 public:
88 // Returns the associated RenderText instance to be used for selection. 88 // Returns the associated RenderText instance to be used for selection.
89 virtual gfx::RenderText* GetRenderTextForSelection() = 0; 89 virtual gfx::RenderText* GetRenderTextForSelection() = 0;
90 90
91 // Methods related to properties of the associated view. 91 // Methods related to properties of the associated view.
92 92
93 // Returns true if the associated text view is read only. 93 // Returns true if the associated text view is read only.
94 virtual bool IsReadOnly() const = 0; 94 virtual bool IsReadOnly() const = 0;
95 // Returns whether the associated view supports drag-and-drop.
96 virtual bool SupportsDrag() const = 0;
95 // Returns whether there is a drag operation originating from the associated 97 // Returns whether there is a drag operation originating from the associated
96 // view. 98 // view.
97 virtual bool HasTextBeingDragged() const = 0; 99 virtual bool HasTextBeingDragged() const = 0;
98 // Sets whether text is being dragged from the associated view. 100 // Sets whether text is being dragged from the associated view.
99 virtual void SetTextBeingDragged(bool value) = 0; 101 virtual void SetTextBeingDragged(bool value) = 0;
100 // Returns the height of the associated view. 102 // Returns the height of the associated view.
101 virtual int GetViewHeight() const = 0; 103 virtual int GetViewHeight() const = 0;
102 // Returns the width of the associated view. 104 // Returns the width of the associated view.
103 virtual int GetViewWidth() const = 0; 105 virtual int GetViewWidth() const = 0;
104 // Returns the drag selection timer delay. This is the duration after which a 106 // Returns the drag selection timer delay. This is the duration after which a
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // the associated text view is obscured. 143 // the associated text view is obscured.
142 virtual void UpdateSelectionClipboard() = 0; 144 virtual void UpdateSelectionClipboard() = 0;
143 145
144 protected: 146 protected:
145 virtual ~Delegate() {} 147 virtual ~Delegate() {}
146 }; 148 };
147 149
148 } // namespace views 150 } // namespace views
149 151
150 #endif // UI_VIEWS_SELECTION_CONTROLLER_H_ 152 #endif // UI_VIEWS_SELECTION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/views/examples/label_example.cc ('k') | ui/views/selection_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698