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

Side by Side Diff: content/browser/renderer_host/tap_suppression_controller_aura.cc

Issue 11361150: Suppress sending mousedown / mouseup when in fling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed checking GEF's queue back when it is empty in unit tests Created 8 years 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
« no previous file with comments | « content/browser/renderer_host/tap_suppression_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/tap_suppression_controller.h" 5 #include "content/browser/renderer_host/tap_suppression_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 case GFC_IN_PROGRESS: 125 case GFC_IN_PROGRESS:
126 if (processed) 126 if (processed)
127 fling_cancel_time_ = base::TimeTicks::Now(); 127 fling_cancel_time_ = base::TimeTicks::Now();
128 state_ = LAST_CANCEL_STOPPED_FLING; 128 state_ = LAST_CANCEL_STOPPED_FLING;
129 break; 129 break;
130 case MD_STASHED: 130 case MD_STASHED:
131 if (!processed) { 131 if (!processed) {
132 TRACE_EVENT0("browser", 132 TRACE_EVENT0("browser",
133 "TapSuppressionController::GestureFlingCancelAck"); 133 "TapSuppressionController::GestureFlingCancelAck");
134 mouse_down_timer_.Stop(); 134 mouse_down_timer_.Stop();
135 render_widget_host_->ForwardMouseEvent(stashed_mouse_down_); 135 render_widget_host_->ForwardMouseEventImmediately(stashed_mouse_down_);
136 state_ = NOTHING; 136 state_ = NOTHING;
137 } // Else waiting for the timer to release the mouse event. 137 } // Else waiting for the timer to release the mouse event.
138 break; 138 break;
139 case LAST_CANCEL_STOPPED_FLING: 139 case LAST_CANCEL_STOPPED_FLING:
140 break; 140 break;
141 } 141 }
142 } 142 }
143 143
144 void TapSuppressionController::GestureFlingCancel(double cancel_time) { 144 void TapSuppressionController::GestureFlingCancel(double cancel_time) {
145 switch (state_) { 145 switch (state_) {
(...skipping 11 matching lines...) Expand all
157 switch (state_) { 157 switch (state_) {
158 case NOTHING: 158 case NOTHING:
159 case GFC_IN_PROGRESS: 159 case GFC_IN_PROGRESS:
160 case LAST_CANCEL_STOPPED_FLING: 160 case LAST_CANCEL_STOPPED_FLING:
161 NOTREACHED() << "Timer fired on invalid state."; 161 NOTREACHED() << "Timer fired on invalid state.";
162 state_ = NOTHING; 162 state_ = NOTHING;
163 break; 163 break;
164 case MD_STASHED: 164 case MD_STASHED:
165 TRACE_EVENT0("browser", 165 TRACE_EVENT0("browser",
166 "TapSuppressionController::MouseDownTimerExpired"); 166 "TapSuppressionController::MouseDownTimerExpired");
167 render_widget_host_->ForwardMouseEvent(stashed_mouse_down_); 167 render_widget_host_->ForwardMouseEventImmediately(stashed_mouse_down_);
168 state_ = NOTHING; 168 state_ = NOTHING;
169 break; 169 break;
170 } 170 }
171 } 171 }
172 172
173 } // namespace content 173 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/tap_suppression_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698