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

Side by Side Diff: content/browser/renderer_host/input/touchpad_tap_suppression_controller_aura.cc

Issue 43203004: Remove GestureEventFilter and clean up related bits assuming that we turn on Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle r.h"
6
7 #include "content/browser/renderer_host/input/tap_suppression_controller.h"
8 #include "content/browser/renderer_host/input/tap_suppression_controller_client. h"
9 #include "ui/events/gestures/gesture_configuration.h"
10
11 namespace content {
12
13 TouchpadTapSuppressionController::TouchpadTapSuppressionController(
14 TouchpadTapSuppressionControllerClient* client)
15 : client_(client),
16 controller_(new TapSuppressionController(this)) {
17 }
18
19 TouchpadTapSuppressionController::~TouchpadTapSuppressionController() {}
20
21 void TouchpadTapSuppressionController::GestureFlingCancel() {
22 controller_->GestureFlingCancel();
23 }
24
25 void TouchpadTapSuppressionController::GestureFlingCancelAck(bool processed) {
26 controller_->GestureFlingCancelAck(processed);
27 }
28
29 bool TouchpadTapSuppressionController::ShouldDeferMouseDown(
30 const MouseEventWithLatencyInfo& event) {
31 bool should_defer = controller_->ShouldDeferTapDown();
32 if (should_defer)
33 stashed_mouse_down_ = event;
34 return should_defer;
35 }
36
37 bool TouchpadTapSuppressionController::ShouldSuppressMouseUp() {
38 return controller_->ShouldSuppressTapUp();
39 }
40
41 int TouchpadTapSuppressionController::MaxCancelToDownTimeInMs() {
42 return ui::GestureConfiguration::fling_max_cancel_to_down_time_in_ms();
43 }
44
45 int TouchpadTapSuppressionController::MaxTapGapTimeInMs() {
46 return ui::GestureConfiguration::fling_max_tap_gap_time_in_ms();
47 }
48
49 void TouchpadTapSuppressionController::DropStashedTapDown() {
50 }
51
52 void TouchpadTapSuppressionController::ForwardStashedTapDown() {
53 // Mouse downs are not handled by gesture event filter; so, they are
54 // immediately forwarded to the renderer.
55 client_->SendMouseEventImmediately(stashed_mouse_down_);
56 }
57
58 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698