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

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

Issue 10928066: Add GestureTapCancel gesture type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix event order and update tests to check it Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | 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/gesture_event_filter.h" 5 #include "content/browser/renderer_host/gesture_event_filter.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "content/browser/renderer_host/render_widget_host_impl.h" 9 #include "content/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/browser/renderer_host/tap_suppression_controller.h" 10 #include "content/browser/renderer_host/tap_suppression_controller.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return false; 132 return false;
133 } 133 }
134 134
135 void GestureEventFilter::Reset() { 135 void GestureEventFilter::Reset() {
136 fling_in_progress_ = false; 136 fling_in_progress_ = false;
137 coalesced_gesture_events_.clear(); 137 coalesced_gesture_events_.clear();
138 // TODO(rjkroege): Reset the tap suppression controller. 138 // TODO(rjkroege): Reset the tap suppression controller.
139 } 139 }
140 140
141 void GestureEventFilter::ProcessGestureAck(bool processed, int type) { 141 void GestureEventFilter::ProcessGestureAck(bool processed, int type) {
142 DCHECK(coalesced_gesture_events_.front().type == type);
sky 2012/09/10 21:17:45 DCHECK_EQ
Rick Byers 2012/09/11 14:04:54 Done.
142 coalesced_gesture_events_.pop_front(); 143 coalesced_gesture_events_.pop_front();
143 if (!coalesced_gesture_events_.empty()) { 144 if (!coalesced_gesture_events_.empty()) {
144 WebGestureEvent next_gesture_event = coalesced_gesture_events_.front(); 145 WebGestureEvent next_gesture_event = coalesced_gesture_events_.front();
145 render_widget_host_->ForwardGestureEventImmediately(next_gesture_event); 146 render_widget_host_->ForwardGestureEventImmediately(next_gesture_event);
146 } 147 }
147 } 148 }
148 149
149 TapSuppressionController* GestureEventFilter::GetTapSuppressionController() { 150 TapSuppressionController* GestureEventFilter::GetTapSuppressionController() {
150 return tap_suppression_controller_.get(); 151 return tap_suppression_controller_.get();
151 } 152 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 last_gesture_event->timeStampSeconds) 187 last_gesture_event->timeStampSeconds)
187 << "Event time not monotonic?\n"; 188 << "Event time not monotonic?\n";
188 DCHECK(last_gesture_event->type == WebInputEvent::GestureScrollUpdate); 189 DCHECK(last_gesture_event->type == WebInputEvent::GestureScrollUpdate);
189 last_gesture_event->timeStampSeconds = gesture_event.timeStampSeconds; 190 last_gesture_event->timeStampSeconds = gesture_event.timeStampSeconds;
190 } else { 191 } else {
191 coalesced_gesture_events_.push_back(gesture_event); 192 coalesced_gesture_events_.push_back(gesture_event);
192 } 193 }
193 } 194 }
194 195
195 } // namespace content 196 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698