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

Side by Side Diff: ui/touch_selection/touch_selection_controller.cc

Issue 1239583003: Update touch selection notification names, add ESTABLISHED. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed changes to tests that are independent of the instertion notification. Created 5 years, 5 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 #include "ui/touch_selection/touch_selection_controller.h" 5 #include "ui/touch_selection/touch_selection_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 OnSelectionChanged(); 125 OnSelectionChanged();
126 return; 126 return;
127 } 127 }
128 128
129 if (start_orientation_ == TouchHandleOrientation::CENTER && 129 if (start_orientation_ == TouchHandleOrientation::CENTER &&
130 selection_editable_) { 130 selection_editable_) {
131 OnInsertionChanged(); 131 OnInsertionChanged();
132 return; 132 return;
133 } 133 }
134 134
135 if (start_orientation_ == TouchHandleOrientation::UNDEFINED) {
jdduke (slow) 2015/07/15 20:33:24 I'm confused, why would we try to activate inserti
Donn Denman 2015/07/15 20:48:03 For a tap-triggered selection there are no handles
136 OnInsertionChanged();
137 }
138
135 HideAndDisallowShowingAutomatically(); 139 HideAndDisallowShowingAutomatically();
136 } 140 }
137 141
138 bool TouchSelectionController::WillHandleTouchEvent(const MotionEvent& event) { 142 bool TouchSelectionController::WillHandleTouchEvent(const MotionEvent& event) {
139 if (config_.enable_longpress_drag_selection && 143 if (config_.enable_longpress_drag_selection &&
140 longpress_drag_selector_.WillHandleTouchEvent(event)) { 144 longpress_drag_selector_.WillHandleTouchEvent(event)) {
141 return true; 145 return true;
142 } 146 }
143 147
144 if (active_status_ == INSERTION_ACTIVE) { 148 if (active_status_ == INSERTION_ACTIVE) {
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 base::TimeDelta duration = base::TimeTicks::Now() - selection_start_time_; 592 base::TimeDelta duration = base::TimeTicks::Now() - selection_start_time_;
589 UMA_HISTOGRAM_CUSTOM_TIMES("Event.TouchSelection.WasDraggedDuration", 593 UMA_HISTOGRAM_CUSTOM_TIMES("Event.TouchSelection.WasDraggedDuration",
590 duration, 594 duration,
591 base::TimeDelta::FromMilliseconds(500), 595 base::TimeDelta::FromMilliseconds(500),
592 base::TimeDelta::FromSeconds(60), 596 base::TimeDelta::FromSeconds(60),
593 60); 597 60);
594 } 598 }
595 } 599 }
596 600
597 } // namespace ui 601 } // namespace ui
OLDNEW
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698