| 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 "content/common/input/input_event.h" | 7 #include "content/common/input/input_event.h" |
| 8 #include "content/common/input/ipc_input_event_payload.h" | 8 #include "content/common/input/ipc_input_event_payload.h" |
| 9 #include "content/common/input/web_input_event_payload.h" | 9 #include "content/common/input/web_input_event_payload.h" |
| 10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 int64 next_event_id = 1; | 124 int64 next_event_id = 1; |
| 125 WebKit::WebKeyboardEvent key_event; | 125 WebKit::WebKeyboardEvent key_event; |
| 126 key_event.type = WebKit::WebInputEvent::RawKeyDown; | 126 key_event.type = WebKit::WebInputEvent::RawKeyDown; |
| 127 key_event.nativeKeyCode = 5; | 127 key_event.nativeKeyCode = 5; |
| 128 AddTo(packet_in, InputEvent::Create( | 128 AddTo(packet_in, InputEvent::Create( |
| 129 ++next_event_id, WebInputEventPayload::Create(key_event, latency, true))); | 129 ++next_event_id, WebInputEventPayload::Create(key_event, latency, true))); |
| 130 | 130 |
| 131 WebKit::WebMouseWheelEvent wheel_event; | 131 WebKit::WebMouseWheelEvent wheel_event; |
| 132 wheel_event.type = WebKit::WebInputEvent::MouseWheel; | 132 wheel_event.type = WebKit::WebInputEvent::MouseWheel; |
| 133 wheel_event.deltaX = 10; | 133 wheel_event.deltaX = 10; |
| 134 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_RWH_COMPONENT, 1, 1); | 134 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1, 1); |
| 135 AddTo(packet_in, InputEvent::Create( | 135 AddTo(packet_in, InputEvent::Create( |
| 136 ++next_event_id, | 136 ++next_event_id, |
| 137 WebInputEventPayload::Create(wheel_event, latency, false))); | 137 WebInputEventPayload::Create(wheel_event, latency, false))); |
| 138 | 138 |
| 139 WebKit::WebMouseEvent mouse_event; | 139 WebKit::WebMouseEvent mouse_event; |
| 140 mouse_event.type = WebKit::WebInputEvent::MouseDown; | 140 mouse_event.type = WebKit::WebInputEvent::MouseDown; |
| 141 mouse_event.x = 10; | 141 mouse_event.x = 10; |
| 142 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2); | 142 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2); |
| 143 AddTo(packet_in, InputEvent::Create( | 143 AddTo(packet_in, InputEvent::Create( |
| 144 ++next_event_id, | 144 ++next_event_id, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 157 touch_event.touches[0].radiusX = 1; | 157 touch_event.touches[0].radiusX = 1; |
| 158 AddTo(packet_in, InputEvent::Create( | 158 AddTo(packet_in, InputEvent::Create( |
| 159 ++next_event_id, | 159 ++next_event_id, |
| 160 WebInputEventPayload::Create(touch_event, latency, false))); | 160 WebInputEventPayload::Create(touch_event, latency, false))); |
| 161 | 161 |
| 162 Verify(packet_in); | 162 Verify(packet_in); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace | 165 } // namespace |
| 166 } // namespace content | 166 } // namespace content |
| OLD | NEW |