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/common/input/input_param_traits.h" | 5 #include "content/common/input/input_param_traits.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 blink::WebMouseWheelEvent wheel_event( | 209 blink::WebMouseWheelEvent wheel_event( |
210 blink::WebInputEvent::MouseWheel, blink::WebInputEvent::NoModifiers, | 210 blink::WebInputEvent::MouseWheel, blink::WebInputEvent::NoModifiers, |
211 blink::WebInputEvent::TimeStampForTesting); | 211 blink::WebInputEvent::TimeStampForTesting); |
212 wheel_event.deltaX = 10; | 212 wheel_event.deltaX = 10; |
213 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1, 1); | 213 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1, 1); |
214 events.push_back(base::MakeUnique<InputEvent>(wheel_event, latency)); | 214 events.push_back(base::MakeUnique<InputEvent>(wheel_event, latency)); |
215 | 215 |
216 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown, | 216 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown, |
217 blink::WebInputEvent::NoModifiers, | 217 blink::WebInputEvent::NoModifiers, |
218 blink::WebInputEvent::TimeStampForTesting); | 218 blink::WebInputEvent::TimeStampForTesting); |
219 mouse_event.x = 10; | 219 mouse_event.setPositionInWidget(10, 0); |
220 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2); | 220 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2); |
221 events.push_back(base::MakeUnique<InputEvent>(mouse_event, latency)); | 221 events.push_back(base::MakeUnique<InputEvent>(mouse_event, latency)); |
222 | 222 |
223 blink::WebGestureEvent gesture_event( | 223 blink::WebGestureEvent gesture_event( |
224 blink::WebInputEvent::GestureScrollBegin, | 224 blink::WebInputEvent::GestureScrollBegin, |
225 blink::WebInputEvent::NoModifiers, | 225 blink::WebInputEvent::NoModifiers, |
226 blink::WebInputEvent::TimeStampForTesting); | 226 blink::WebInputEvent::TimeStampForTesting); |
227 gesture_event.x = -1; | 227 gesture_event.x = -1; |
228 events.push_back(base::MakeUnique<InputEvent>(gesture_event, latency)); | 228 events.push_back(base::MakeUnique<InputEvent>(gesture_event, latency)); |
229 | 229 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 | 360 |
361 ASSERT_EQ(SyntheticGestureParams::POINTER_ACTION_LIST, | 361 ASSERT_EQ(SyntheticGestureParams::POINTER_ACTION_LIST, |
362 gesture_params->GetGestureType()); | 362 gesture_params->GetGestureType()); |
363 SyntheticGesturePacket packet_in; | 363 SyntheticGesturePacket packet_in; |
364 packet_in.set_gesture_params(std::move(gesture_params)); | 364 packet_in.set_gesture_params(std::move(gesture_params)); |
365 Verify(packet_in); | 365 Verify(packet_in); |
366 } | 366 } |
367 | 367 |
368 } // namespace | 368 } // namespace |
369 } // namespace content | 369 } // namespace content |
OLD | NEW |