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/synthetic_web_input_event_builders
.h" | 5 #include "content/browser/renderer_host/input/synthetic_web_input_event_builders
.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/renderer_host/input/web_input_event_util.h" | 8 #include "content/browser/renderer_host/input/web_input_event_util.h" |
9 #include "ui/events/keycodes/keyboard_codes.h" | 9 #include "ui/events/keycodes/keyboard_codes.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 using WebKit::WebInputEvent; | 13 using blink::WebInputEvent; |
14 using WebKit::WebKeyboardEvent; | 14 using blink::WebKeyboardEvent; |
15 using WebKit::WebGestureEvent; | 15 using blink::WebGestureEvent; |
16 using WebKit::WebMouseEvent; | 16 using blink::WebMouseEvent; |
17 using WebKit::WebMouseWheelEvent; | 17 using blink::WebMouseWheelEvent; |
18 using WebKit::WebTouchEvent; | 18 using blink::WebTouchEvent; |
19 using WebKit::WebTouchPoint; | 19 using blink::WebTouchPoint; |
20 | 20 |
21 WebMouseEvent SyntheticWebMouseEventBuilder::Build( | 21 WebMouseEvent SyntheticWebMouseEventBuilder::Build( |
22 WebKit::WebInputEvent::Type type) { | 22 blink::WebInputEvent::Type type) { |
23 WebMouseEvent result; | 23 WebMouseEvent result; |
24 result.type = type; | 24 result.type = type; |
25 return result; | 25 return result; |
26 } | 26 } |
27 | 27 |
28 WebMouseEvent SyntheticWebMouseEventBuilder::Build( | 28 WebMouseEvent SyntheticWebMouseEventBuilder::Build( |
29 WebKit::WebInputEvent::Type type, | 29 blink::WebInputEvent::Type type, |
30 int window_x, | 30 int window_x, |
31 int window_y, | 31 int window_y, |
32 int modifiers) { | 32 int modifiers) { |
33 DCHECK(WebInputEvent::isMouseEventType(type)); | 33 DCHECK(WebInputEvent::isMouseEventType(type)); |
34 WebMouseEvent result = Build(type); | 34 WebMouseEvent result = Build(type); |
35 result.x = window_x; | 35 result.x = window_x; |
36 result.y = window_y; | 36 result.y = window_y; |
37 result.windowX = window_x; | 37 result.windowX = window_x; |
38 result.windowY = window_y; | 38 result.windowY = window_y; |
39 result.modifiers = modifiers; | 39 result.modifiers = modifiers; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 SyntheticWebTouchEvent SyntheticWebTouchEventBuilder::Build( | 175 SyntheticWebTouchEvent SyntheticWebTouchEventBuilder::Build( |
176 WebInputEvent::Type type) { | 176 WebInputEvent::Type type) { |
177 DCHECK(WebInputEvent::isTouchEventType(type)); | 177 DCHECK(WebInputEvent::isTouchEventType(type)); |
178 SyntheticWebTouchEvent result; | 178 SyntheticWebTouchEvent result; |
179 result.type = type; | 179 result.type = type; |
180 return result; | 180 return result; |
181 }; | 181 }; |
182 | 182 |
183 } // namespace content | 183 } // namespace content |
OLD | NEW |