OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/browser/renderer_host/input/input_ack_handler.h" | 10 #include "content/browser/renderer_host/input/input_ack_handler.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 input_router_->SendGestureEvent( | 232 input_router_->SendGestureEvent( |
233 GestureEventWithLatencyInfo(gesture, latency)); | 233 GestureEventWithLatencyInfo(gesture, latency)); |
234 } | 234 } |
235 | 235 |
236 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) { | 236 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) { |
237 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency)); | 237 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency)); |
238 } | 238 } |
239 | 239 |
240 void SendEventAckIfNecessary(const blink::WebInputEvent& event, | 240 void SendEventAckIfNecessary(const blink::WebInputEvent& event, |
241 InputEventAckState ack_result) { | 241 InputEventAckState ack_result) { |
242 if (!WebInputEventTraits::WillReceiveAckFromRenderer(event)) | 242 if (!WebInputEventTraits::ShouldBlockEventStream(event)) |
243 return; | 243 return; |
244 InputEventAck ack(event.type, ack_result); | 244 InputEventAck ack(event.type, ack_result); |
245 InputHostMsg_HandleInputEvent_ACK response(0, ack); | 245 InputHostMsg_HandleInputEvent_ACK response(0, ack); |
246 input_router_->OnMessageReceived(response); | 246 input_router_->OnMessageReceived(response); |
247 } | 247 } |
248 | 248 |
249 void OnHasTouchEventHandlers(bool has_handlers) { | 249 void OnHasTouchEventHandlers(bool has_handlers) { |
250 input_router_->OnMessageReceived( | 250 input_router_->OnMessageReceived( |
251 ViewHostMsg_HasTouchEventHandlers(0, has_handlers)); | 251 ViewHostMsg_HasTouchEventHandlers(0, has_handlers)); |
252 } | 252 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 379 |
380 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { | 380 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { |
381 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", | 381 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", |
382 kDefaultSteps, | 382 kDefaultSteps, |
383 kDefaultOrigin, | 383 kDefaultOrigin, |
384 kDefaultDistance, | 384 kDefaultDistance, |
385 kDefaultIterations); | 385 kDefaultIterations); |
386 } | 386 } |
387 | 387 |
388 } // namespace content | 388 } // namespace content |
OLD | NEW |