| OLD | NEW |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 using blink::WebGestureDevice; | 44 using blink::WebGestureDevice; |
| 45 using blink::WebGestureEvent; | 45 using blink::WebGestureEvent; |
| 46 using blink::WebKeyboardEvent; | 46 using blink::WebKeyboardEvent; |
| 47 using blink::WebInputEvent; | 47 using blink::WebInputEvent; |
| 48 using blink::WebMouseEvent; | 48 using blink::WebMouseEvent; |
| 49 using blink::WebMouseWheelEvent; | 49 using blink::WebMouseWheelEvent; |
| 50 using blink::WebTouchEvent; | 50 using blink::WebTouchEvent; |
| 51 using blink::WebTouchPoint; | 51 using blink::WebTouchPoint; |
| 52 using ui::DidOverscrollParams; |
| 52 | 53 |
| 53 namespace content { | 54 namespace content { |
| 54 | 55 |
| 55 namespace { | 56 namespace { |
| 56 | 57 |
| 57 const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) { | 58 const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) { |
| 58 base::PickleIterator iter(message); | 59 base::PickleIterator iter(message); |
| 59 const char* data; | 60 const char* data; |
| 60 int data_length; | 61 int data_length; |
| 61 if (!iter.ReadData(&data, &data_length)) | 62 if (!iter.ReadData(&data, &data_length)) |
| (...skipping 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2277 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); | 2278 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); |
| 2278 | 2279 |
| 2279 const WebGestureEvent* filter_event = | 2280 const WebGestureEvent* filter_event = |
| 2280 GetFilterWebInputEvent<WebGestureEvent>(); | 2281 GetFilterWebInputEvent<WebGestureEvent>(); |
| 2281 TestLocationInFilterEvent(filter_event, orig); | 2282 TestLocationInFilterEvent(filter_event, orig); |
| 2282 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); | 2283 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); |
| 2283 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); | 2284 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); |
| 2284 } | 2285 } |
| 2285 | 2286 |
| 2286 } // namespace content | 2287 } // namespace content |
| OLD | NEW |