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

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

Issue 698253004: Reland: Implement Aura side of unified touch text selection for contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase by Mikhail Created 6 years, 1 month 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // To be called when the editability of the focused region changes. 76 // To be called when the editability of the focused region changes.
77 void OnSelectionEditable(bool editable); 77 void OnSelectionEditable(bool editable);
78 78
79 // To be called when the contents of the focused region changes. 79 // To be called when the contents of the focused region changes.
80 void OnSelectionEmpty(bool empty); 80 void OnSelectionEmpty(bool empty);
81 81
82 // Ticks an active animation, as requested to the client by |SetNeedsAnimate|. 82 // Ticks an active animation, as requested to the client by |SetNeedsAnimate|.
83 // Returns true if an animation is active and requires further ticking. 83 // Returns true if an animation is active and requires further ticking.
84 bool Animate(base::TimeTicks animate_time); 84 bool Animate(base::TimeTicks animate_time);
85 85
86 void ActivateSelection(const cc::ViewportSelectionBound& start,
87 const cc::ViewportSelectionBound& end);
88
89 bool is_insertion_active() const { return is_insertion_active_; }
90 bool is_selection_active() const { return is_selection_active_; }
91
86 private: 92 private:
87 enum InputEventType { TAP, LONG_PRESS, INPUT_EVENT_TYPE_NONE }; 93 enum InputEventType { TAP, LONG_PRESS, INPUT_EVENT_TYPE_NONE };
88 94
89 // TouchHandleClient implementation. 95 // TouchHandleClient implementation.
90 void OnHandleDragBegin(const TouchHandle& handle) override; 96 void OnHandleDragBegin(const TouchHandle& handle) override;
91 void OnHandleDragUpdate(const TouchHandle& handle, 97 void OnHandleDragUpdate(const TouchHandle& handle,
92 const gfx::PointF& new_position) override; 98 const gfx::PointF& new_position) override;
93 void OnHandleDragEnd(const TouchHandle& handle) override; 99 void OnHandleDragEnd(const TouchHandle& handle) override;
94 void OnHandleTapped(const TouchHandle& handle) override; 100 void OnHandleTapped(const TouchHandle& handle) override;
95 void SetNeedsAnimate() override; 101 void SetNeedsAnimate() override;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 bool selection_editable_; 147 bool selection_editable_;
142 148
143 bool temporarily_hidden_; 149 bool temporarily_hidden_;
144 150
145 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); 151 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController);
146 }; 152 };
147 153
148 } // namespace content 154 } // namespace content
149 155
150 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_ 156 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698