OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_input_event_aura.h" | 5 #include "content/browser/renderer_host/web_input_event_aura.h" |
6 | 6 |
7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
8 #include "ui/base/event.h" | 8 #include "ui/base/event.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 15 matching lines...) Expand all Loading... |
26 ui::MouseEvent* event); | 26 ui::MouseEvent* event); |
27 WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( | 27 WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( |
28 ui::ScrollEvent* event); | 28 ui::ScrollEvent* event); |
29 WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( | 29 WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( |
30 ui::KeyEvent* event); | 30 ui::KeyEvent* event); |
31 WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( | 31 WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( |
32 ui::GestureEventImpl* event); | 32 ui::GestureEventImpl* event); |
33 WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( | 33 WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( |
34 ui::ScrollEvent* event); | 34 ui::ScrollEvent* event); |
35 WebKit::WebTouchPoint* UpdateWebTouchEventFromAuraEvent( | 35 WebKit::WebTouchPoint* UpdateWebTouchEventFromAuraEvent( |
36 ui::TouchEventImpl* event, WebKit::WebTouchEvent* web_event); | 36 ui::TouchEvent* event, WebKit::WebTouchEvent* web_event); |
37 #endif | 37 #endif |
38 | 38 |
39 // General approach: | 39 // General approach: |
40 // | 40 // |
41 // ui::Event only carries a subset of possible event data provided to Aura by | 41 // ui::Event only carries a subset of possible event data provided to Aura by |
42 // the host platform. WebKit utilizes a larger subset of that information than | 42 // the host platform. WebKit utilizes a larger subset of that information than |
43 // Aura itself. WebKit includes some built in cracking functionality that we | 43 // Aura itself. WebKit includes some built in cracking functionality that we |
44 // rely on to obtain this information cleanly and consistently. | 44 // rely on to obtain this information cleanly and consistently. |
45 // | 45 // |
46 // The only place where an ui::Event's data differs from what the underlying | 46 // The only place where an ui::Event's data differs from what the underlying |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 177 } |
178 | 178 |
179 WebKit::WebGestureEvent MakeWebGestureEventFlingCancel() { | 179 WebKit::WebGestureEvent MakeWebGestureEventFlingCancel() { |
180 WebKit::WebGestureEvent gesture_event; | 180 WebKit::WebGestureEvent gesture_event; |
181 | 181 |
182 // All other fields are ignored on a GestureFlingCancel event. | 182 // All other fields are ignored on a GestureFlingCancel event. |
183 gesture_event.type = WebKit::WebInputEvent::GestureFlingCancel; | 183 gesture_event.type = WebKit::WebInputEvent::GestureFlingCancel; |
184 return gesture_event; | 184 return gesture_event; |
185 } | 185 } |
186 | 186 |
187 WebKit::WebTouchPoint* UpdateWebTouchEvent(ui::TouchEventImpl* event, | 187 WebKit::WebTouchPoint* UpdateWebTouchEvent(ui::TouchEvent* event, |
188 WebKit::WebTouchEvent* web_event) { | 188 WebKit::WebTouchEvent* web_event) { |
189 #if defined(OS_WIN) | 189 #if defined(OS_WIN) |
190 return UpdateWebTouchEventFromNativeEvent(event->native_event(), web_event); | 190 return UpdateWebTouchEventFromNativeEvent(event->native_event(), web_event); |
191 #else | 191 #else |
192 return UpdateWebTouchEventFromAuraEvent(event, web_event); | 192 return UpdateWebTouchEventFromAuraEvent(event, web_event); |
193 #endif | 193 #endif |
194 } | 194 } |
195 | 195 |
196 } // namespace content | 196 } // namespace content |
OLD | NEW |