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

Unified Diff: content/browser/renderer_host/input/touch_selection_controller.cc

Issue 516573003: Use platform slop/timeout values for selection handle tap detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 6 years, 4 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: content/browser/renderer_host/input/touch_selection_controller.cc
diff --git a/content/browser/renderer_host/input/touch_selection_controller.cc b/content/browser/renderer_host/input/touch_selection_controller.cc
index f27d6908bc96a6aec6e6dc0ee20ed40a93120e28..e904e283ee0716401cea8556353b8eba048032d1 100644
--- a/content/browser/renderer_host/input/touch_selection_controller.cc
+++ b/content/browser/renderer_host/input/touch_selection_controller.cc
@@ -29,8 +29,12 @@ TouchHandleOrientation ToTouchHandleOrientation(cc::SelectionBoundType type) {
} // namespace
TouchSelectionController::TouchSelectionController(
- TouchSelectionControllerClient* client)
+ TouchSelectionControllerClient* client,
+ base::TimeDelta tap_timeout,
+ float tap_slop)
: client_(client),
+ tap_timeout_(tap_timeout),
+ tap_slop_(tap_slop),
response_pending_input_event_(INPUT_EVENT_TYPE_NONE),
start_orientation_(TOUCH_HANDLE_ORIENTATION_UNDEFINED),
end_orientation_(TOUCH_HANDLE_ORIENTATION_UNDEFINED),
@@ -248,6 +252,14 @@ scoped_ptr<TouchHandleDrawable> TouchSelectionController::CreateDrawable() {
return client_->CreateDrawable();
}
+base::TimeDelta TouchSelectionController::GetTapTimeout() const {
+ return tap_timeout_;
+}
+
+float TouchSelectionController::GetTapSlop() const {
+ return tap_slop_;
+}
+
void TouchSelectionController::ShowInsertionHandleAutomatically() {
if (activate_insertion_automatically_)
return;

Powered by Google App Engine
This is Rietveld 408576698