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

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

Issue 2663493003: Move the TouchEventQueue to be completely virtual. (Closed)
Patch Set: Fix nits Created 3 years, 10 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 2013 The Chromium Authors. All rights reserved. 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 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/input_router_impl.h" 5 #include "content/browser/renderer_host/input/input_router_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 InputEventAck ack(InputEventAckSource::COMPOSITOR_THREAD, type, ack_result, 297 InputEventAck ack(InputEventAckSource::COMPOSITOR_THREAD, type, ack_result,
298 touch_event_id); 298 touch_event_id);
299 input_router_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack)); 299 input_router_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack));
300 } 300 }
301 301
302 InputRouterImpl* input_router() const { 302 InputRouterImpl* input_router() const {
303 return input_router_.get(); 303 return input_router_.get();
304 } 304 }
305 305
306 bool TouchEventQueueEmpty() const { 306 bool TouchEventQueueEmpty() const {
307 return input_router()->touch_event_queue_.empty(); 307 return input_router()->touch_event_queue_->Empty();
308 } 308 }
309 309
310 bool TouchEventTimeoutEnabled() const { 310 bool TouchEventTimeoutEnabled() const {
311 return input_router()->touch_event_queue_.IsAckTimeoutEnabled(); 311 return input_router()->touch_event_queue_->IsAckTimeoutEnabled();
312 } 312 }
313 313
314 void RequestNotificationWhenFlushed() const { 314 void RequestNotificationWhenFlushed() const {
315 return input_router_->RequestNotificationWhenFlushed(); 315 return input_router_->RequestNotificationWhenFlushed();
316 } 316 }
317 317
318 size_t GetAndResetDidFlushCount() { 318 size_t GetAndResetDidFlushCount() {
319 return client_->GetAndResetDidFlushCount(); 319 return client_->GetAndResetDidFlushCount();
320 } 320 }
321 321
(...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); 2281 EXPECT_EQ(80, sent_event->data.flingStart.velocityY);
2282 2282
2283 const WebGestureEvent* filter_event = 2283 const WebGestureEvent* filter_event =
2284 GetFilterWebInputEvent<WebGestureEvent>(); 2284 GetFilterWebInputEvent<WebGestureEvent>();
2285 TestLocationInFilterEvent(filter_event, orig); 2285 TestLocationInFilterEvent(filter_event, orig);
2286 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); 2286 EXPECT_EQ(30, filter_event->data.flingStart.velocityX);
2287 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); 2287 EXPECT_EQ(40, filter_event->data.flingStart.velocityY);
2288 } 2288 }
2289 2289
2290 } // namespace content 2290 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698