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

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

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.h
diff --git a/content/browser/renderer_host/input/touch_selection_controller.h b/content/browser/renderer_host/input/touch_selection_controller.h
index 20a1f8ea8af37f34c97558affd476347dd5fbf2a..13031e12b9b326733fa02d7a5f5d94af13afae61 100644
--- a/content/browser/renderer_host/input/touch_selection_controller.h
+++ b/content/browser/renderer_host/input/touch_selection_controller.h
@@ -41,7 +41,9 @@ class CONTENT_EXPORT TouchSelectionControllerClient {
// Controller for manipulating text selection via touch input.
class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient {
public:
- explicit TouchSelectionController(TouchSelectionControllerClient* client);
+ TouchSelectionController(TouchSelectionControllerClient* client,
+ base::TimeDelta tap_timeout,
+ float tap_slop);
virtual ~TouchSelectionController();
// To be called when the selection bounds have changed.
@@ -91,6 +93,8 @@ class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient {
virtual void OnHandleTapped(const TouchHandle& handle) OVERRIDE;
virtual void SetNeedsAnimate() OVERRIDE;
virtual scoped_ptr<TouchHandleDrawable> CreateDrawable() OVERRIDE;
+ virtual base::TimeDelta GetTapTimeout() const OVERRIDE;
+ virtual float GetTapSlop() const OVERRIDE;
void ShowInsertionHandleAutomatically();
void ShowSelectionHandlesAutomatically();
@@ -113,6 +117,8 @@ class CONTENT_EXPORT TouchSelectionController : public TouchHandleClient {
TouchHandle::AnimationStyle GetAnimationStyle(bool was_active) const;
TouchSelectionControllerClient* const client_;
+ const base::TimeDelta tap_timeout_;
+ const float tap_slop_;
InputEventType response_pending_input_event_;

Powered by Google App Engine
This is Rietveld 408576698