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

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

Issue 217163006: Defer synthetic gesture completions until events have been flushed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore browser test Created 6 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/input/gesture_event_queue.h" 5 #include "content/browser/renderer_host/input/gesture_event_queue.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/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "content/browser/renderer_host/input/input_router.h" 10 #include "content/browser/renderer_host/input/input_router.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 client_->SendGestureEventImmediately(first_gesture_event); 236 client_->SendGestureEventImmediately(first_gesture_event);
237 if (second_gesture_event.event.type != WebInputEvent::Undefined) 237 if (second_gesture_event.event.type != WebInputEvent::Undefined)
238 client_->SendGestureEventImmediately(second_gesture_event); 238 client_->SendGestureEventImmediately(second_gesture_event);
239 } 239 }
240 240
241 TouchpadTapSuppressionController* 241 TouchpadTapSuppressionController*
242 GestureEventQueue::GetTouchpadTapSuppressionController() { 242 GestureEventQueue::GetTouchpadTapSuppressionController() {
243 return touchpad_tap_suppression_controller_.get(); 243 return touchpad_tap_suppression_controller_.get();
244 } 244 }
245 245
246 bool GestureEventQueue::HasQueuedGestureEvents() const { 246 bool GestureEventQueue::ExpectingGestureAck() const {
247 return !coalesced_gesture_events_.empty(); 247 return !coalesced_gesture_events_.empty();
248 } 248 }
249 249
250 void GestureEventQueue::FlingHasBeenHalted() { 250 void GestureEventQueue::FlingHasBeenHalted() {
251 fling_in_progress_ = false; 251 fling_in_progress_ = false;
252 } 252 }
253 253
254 bool GestureEventQueue::ShouldHandleEventNow() const { 254 bool GestureEventQueue::ShouldHandleEventNow() const {
255 return coalesced_gesture_events_.size() == 1; 255 return coalesced_gesture_events_.size() == 1;
256 } 256 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 void GestureEventQueue::EnqueueEvent( 380 void GestureEventQueue::EnqueueEvent(
381 const GestureEventWithLatencyInfo& gesture_event) { 381 const GestureEventWithLatencyInfo& gesture_event) {
382 coalesced_gesture_events_.push_back(gesture_event); 382 coalesced_gesture_events_.push_back(gesture_event);
383 // Scroll and pinch events contributing to |combined_scroll_pinch_| will be 383 // Scroll and pinch events contributing to |combined_scroll_pinch_| will be
384 // manually added to the queue in |MergeOrInsertScrollAndPinchEvent()|. 384 // manually added to the queue in |MergeOrInsertScrollAndPinchEvent()|.
385 combined_scroll_pinch_ = gfx::Transform(); 385 combined_scroll_pinch_ = gfx::Transform();
386 } 386 }
387 387
388 } // namespace content 388 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/gesture_event_queue.h ('k') | content/browser/renderer_host/input/input_router_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698