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

Unified Diff: ui/touch_selection/touch_selection_controller.cc

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: Rebased after addition of touch_handle_orientation file Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ui/touch_selection/touch_selection_controller.cc
diff --git a/ui/touch_selection/touch_selection_controller.cc b/ui/touch_selection/touch_selection_controller.cc
index 71dcce80c0807b1262b2429d5d67912e1ce3140c..a2e719223b956d3874bd555fd4a9924816c1eb70 100644
--- a/ui/touch_selection/touch_selection_controller.cc
+++ b/ui/touch_selection/touch_selection_controller.cc
@@ -66,11 +66,11 @@ TouchSelectionController::TouchSelectionController(
TouchSelectionController::~TouchSelectionController() {
}
-void TouchSelectionController::OnSelectionBoundsChanged(
+bool TouchSelectionController::OnSelectionBoundsUpdated(
const SelectionBound& start,
const SelectionBound& end) {
if (start == start_ && end_ == end)
- return;
+ return false;
start_ = start;
end_ = end;
@@ -80,7 +80,7 @@ void TouchSelectionController::OnSelectionBoundsChanged(
if (!activate_selection_automatically_ &&
!activate_insertion_automatically_) {
DCHECK_EQ(INPUT_EVENT_TYPE_NONE, response_pending_input_event_);
- return;
+ return false;
}
// Ensure that |response_pending_input_event_| is cleared after the method
@@ -113,16 +113,17 @@ void TouchSelectionController::OnSelectionBoundsChanged(
start_orientation_ != TouchHandleOrientation::UNDEFINED &&
end_orientation_ != TouchHandleOrientation::UNDEFINED)) {
OnSelectionChanged();
- return;
+ return true;
}
if (start_orientation_ == TouchHandleOrientation::CENTER &&
selection_editable_) {
OnInsertionChanged();
- return;
+ return true;
}
HideAndDisallowShowingAutomatically();
+ return true;
}
bool TouchSelectionController::WillHandleTouchEvent(const MotionEvent& event) {

Powered by Google App Engine
This is Rietveld 408576698