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

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

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) { 244 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) {
245 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency)); 245 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency));
246 } 246 }
247 247
248 void SendEventAckIfNecessary(const blink::WebInputEvent& event, 248 void SendEventAckIfNecessary(const blink::WebInputEvent& event,
249 InputEventAckState ack_result) { 249 InputEventAckState ack_result) {
250 if (!ui::WebInputEventTraits::ShouldBlockEventStream(event)) 250 if (!ui::WebInputEventTraits::ShouldBlockEventStream(event))
251 return; 251 return;
252 InputEventAck ack(InputEventAckSource::COMPOSITOR_THREAD, event.type, 252 InputEventAck ack(InputEventAckSource::COMPOSITOR_THREAD, event.type(),
253 ack_result); 253 ack_result);
254 InputHostMsg_HandleInputEvent_ACK response(0, ack); 254 InputHostMsg_HandleInputEvent_ACK response(0, ack);
255 input_router_->OnMessageReceived(response); 255 input_router_->OnMessageReceived(response);
256 } 256 }
257 257
258 void OnHasTouchEventHandlers(bool has_handlers) { 258 void OnHasTouchEventHandlers(bool has_handlers) {
259 input_router_->OnMessageReceived( 259 input_router_->OnMessageReceived(
260 ViewHostMsg_HasTouchEventHandlers(0, has_handlers)); 260 ViewHostMsg_HasTouchEventHandlers(0, has_handlers));
261 } 261 }
262 262
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { 389 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) {
390 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", 390 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ",
391 kDefaultSteps, 391 kDefaultSteps,
392 kDefaultOrigin, 392 kDefaultOrigin,
393 kDefaultDistance, 393 kDefaultDistance,
394 kDefaultIterations); 394 kDefaultIterations);
395 } 395 }
396 396
397 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698