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

Unified Diff: content/browser/renderer_host/touchpad_tap_suppression_controller_aura.cc

Issue 12087140: Suppress touchscreen tap immediately after a GestureFlingCancel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/touchpad_tap_suppression_controller_aura.cc
diff --git a/content/browser/renderer_host/tap_suppression_controller_aura.cc b/content/browser/renderer_host/touchpad_tap_suppression_controller_aura.cc
similarity index 76%
rename from content/browser/renderer_host/tap_suppression_controller_aura.cc
rename to content/browser/renderer_host/touchpad_tap_suppression_controller_aura.cc
index 7d7c2649023d638681c9adabc29bdd1f05e8d3fe..7afe58910491d81d53514b8caa28bb1dbfaacf79 100644
--- a/content/browser/renderer_host/tap_suppression_controller_aura.cc
+++ b/content/browser/renderer_host/touchpad_tap_suppression_controller_aura.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/renderer_host/tap_suppression_controller.h"
+#include "content/browser/renderer_host/touchpad_tap_suppression_controller.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
@@ -14,14 +14,15 @@
namespace content {
-TapSuppressionController::TapSuppressionController(RenderWidgetHostImpl* rwhv)
- : render_widget_host_(rwhv),
- state_(TapSuppressionController::NOTHING) {
+TouchpadTapSuppressionController::TouchpadTapSuppressionController(
+ RenderWidgetHostImpl* rwhv)
+ : render_widget_host_(rwhv),
+ state_(TouchpadTapSuppressionController::NOTHING) {
}
-TapSuppressionController::~TapSuppressionController() { }
+TouchpadTapSuppressionController::~TouchpadTapSuppressionController() { }
-bool TapSuppressionController::ShouldSuppressMouseUp() {
+bool TouchpadTapSuppressionController::ShouldSuppressMouseUp() {
switch (state_) {
case NOTHING:
case GFC_IN_PROGRESS:
@@ -36,7 +37,7 @@ bool TapSuppressionController::ShouldSuppressMouseUp() {
return false;
}
-bool TapSuppressionController::ShouldDeferMouseDown(
+bool TouchpadTapSuppressionController::ShouldDeferMouseDown(
const WebKit::WebMouseEvent& event) {
switch (state_) {
case NOTHING:
@@ -47,7 +48,7 @@ bool TapSuppressionController::ShouldDeferMouseDown(
base::TimeDelta::FromMilliseconds(
ui::GestureConfiguration::fling_max_tap_gap_time_in_ms()),
this,
- &TapSuppressionController::MouseDownTimerExpired);
+ &TouchpadTapSuppressionController::MouseDownTimerExpired);
stashed_mouse_down_ = event;
state_ = MD_STASHED;
return true;
@@ -64,7 +65,7 @@ bool TapSuppressionController::ShouldDeferMouseDown(
base::TimeDelta::FromMilliseconds(
ui::GestureConfiguration::fling_max_tap_gap_time_in_ms()),
this,
- &TapSuppressionController::MouseDownTimerExpired);
+ &TouchpadTapSuppressionController::MouseDownTimerExpired);
stashed_mouse_down_ = event;
return true;
} else {
@@ -75,7 +76,7 @@ bool TapSuppressionController::ShouldDeferMouseDown(
return false;
}
-void TapSuppressionController::GestureFlingCancelAck(bool processed) {
+void TouchpadTapSuppressionController::GestureFlingCancelAck(bool processed) {
switch (state_) {
case NOTHING:
NOTREACHED() << "GFC_Ack without a GFC";
@@ -99,7 +100,7 @@ void TapSuppressionController::GestureFlingCancelAck(bool processed) {
}
}
-void TapSuppressionController::GestureFlingCancel(double cancel_time) {
+void TouchpadTapSuppressionController::GestureFlingCancel(double cancel_time) {
switch (state_) {
case NOTHING:
case GFC_IN_PROGRESS:
@@ -111,7 +112,7 @@ void TapSuppressionController::GestureFlingCancel(double cancel_time) {
}
}
-void TapSuppressionController::MouseDownTimerExpired() {
+void TouchpadTapSuppressionController::MouseDownTimerExpired() {
switch (state_) {
case NOTHING:
case GFC_IN_PROGRESS:
@@ -121,11 +122,11 @@ void TapSuppressionController::MouseDownTimerExpired() {
break;
case MD_STASHED:
TRACE_EVENT0("browser",
- "TapSuppressionController::MouseDownTimerExpired");
+ "TouchpadTapSuppressionController::MouseDownTimerExpired");
render_widget_host_->ForwardMouseEventImmediately(stashed_mouse_down_);
state_ = NOTHING;
break;
}
}
-} // namespace content
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698