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

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

Issue 2240983003: Move |ScopedWebInputEvent| and |WebInputEventTraits| from |content::| to "ui/events/blink" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and ncarter's review Created 4 years, 4 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"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "content/browser/renderer_host/input/input_ack_handler.h" 12 #include "content/browser/renderer_host/input/input_ack_handler.h"
13 #include "content/browser/renderer_host/input/input_router_client.h" 13 #include "content/browser/renderer_host/input/input_router_client.h"
14 #include "content/browser/renderer_host/input/input_router_impl.h" 14 #include "content/browser/renderer_host/input/input_router_impl.h"
15 #include "content/common/input/web_input_event_traits.h"
16 #include "content/common/input_messages.h" 15 #include "content/common/input_messages.h"
17 #include "content/common/view_messages.h" 16 #include "content/common/view_messages.h"
18 #include "ipc/ipc_sender.h" 17 #include "ipc/ipc_sender.h"
19 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
20 #include "testing/perf/perf_test.h" 19 #include "testing/perf/perf_test.h"
20 #include "ui/events/blink/web_input_event_traits.h"
21 #include "ui/gfx/geometry/vector2d_f.h" 21 #include "ui/gfx/geometry/vector2d_f.h"
22 22
23 using base::TimeDelta; 23 using base::TimeDelta;
24 using blink::WebGestureEvent; 24 using blink::WebGestureEvent;
25 using blink::WebInputEvent; 25 using blink::WebInputEvent;
26 using blink::WebTouchEvent; 26 using blink::WebTouchEvent;
27 using blink::WebTouchPoint; 27 using blink::WebTouchPoint;
28 28
29 namespace content { 29 namespace content {
30 30
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 input_router_->SendGestureEvent( 237 input_router_->SendGestureEvent(
238 GestureEventWithLatencyInfo(gesture, latency)); 238 GestureEventWithLatencyInfo(gesture, latency));
239 } 239 }
240 240
241 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) { 241 void SendEvent(const WebTouchEvent& touch, const ui::LatencyInfo& latency) {
242 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency)); 242 input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch, latency));
243 } 243 }
244 244
245 void SendEventAckIfNecessary(const blink::WebInputEvent& event, 245 void SendEventAckIfNecessary(const blink::WebInputEvent& event,
246 InputEventAckState ack_result) { 246 InputEventAckState ack_result) {
247 if (!WebInputEventTraits::ShouldBlockEventStream(event)) 247 if (!ui::WebInputEventTraits::ShouldBlockEventStream(event))
248 return; 248 return;
249 InputEventAck ack(event.type, ack_result); 249 InputEventAck ack(event.type, ack_result);
250 InputHostMsg_HandleInputEvent_ACK response(0, ack); 250 InputHostMsg_HandleInputEvent_ACK response(0, ack);
251 input_router_->OnMessageReceived(response); 251 input_router_->OnMessageReceived(response);
252 } 252 }
253 253
254 void OnHasTouchEventHandlers(bool has_handlers) { 254 void OnHasTouchEventHandlers(bool has_handlers) {
255 input_router_->OnMessageReceived( 255 input_router_->OnMessageReceived(
256 ViewHostMsg_HasTouchEventHandlers(0, has_handlers)); 256 ViewHostMsg_HasTouchEventHandlers(0, has_handlers));
257 } 257 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { 385 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) {
386 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", 386 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ",
387 kDefaultSteps, 387 kDefaultSteps,
388 kDefaultOrigin, 388 kDefaultOrigin,
389 kDefaultDistance, 389 kDefaultDistance,
390 kDefaultIterations); 390 kDefaultIterations);
391 } 391 }
392 392
393 } // namespace content 393 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698