Chromium Code Reviews| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "third_party/WebKit/public/web/WebInputEvent.h" | |
| 9 #include "ui/events/keycodes/keyboard_codes.h" | 10 #include "ui/events/keycodes/keyboard_codes.h" |
| 10 | 11 |
| 11 namespace blink { | 12 namespace ui{ |
| 12 class WebKeyboardEvent; | 13 struct GestureEventData; |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 | 17 |
| 17 // Update |event|'s windowsKeyCode and keyIdentifer properties using the | 18 // Update |event|'s windowsKeyCode and keyIdentifer properties using the |
| 18 // provided |windows_key_code|. | 19 // provided |windows_key_code|. |
| 19 CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier( | 20 CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier( |
| 20 blink::WebKeyboardEvent* event, | 21 blink::WebKeyboardEvent* event, |
| 21 ui::KeyboardCode windows_key_code); | 22 ui::KeyboardCode windows_key_code); |
| 22 | 23 |
| 23 } | 24 // Converts a ui::GestureEventData payload to a WebGestureEvent, using the |
| 25 // |scale| multiplier on all relevant gesture components. Note that on Android, | |
| 26 // this will be the inverse of the DPI scale (scaling from pixels to DIPs). | |
| 27 CONTENT_EXPORT blink::WebGestureEvent CreateWebGestureEventFromGestureEventData( | |
|
tdresser
2014/03/03 19:44:32
Should this go in content/browser/renderer_host/ui
jdduke (slow)
2014/03/03 22:33:17
I believe that has an events target dependency, an
| |
| 28 const ui::GestureEventData& data, | |
| 29 float scale); | |
| 30 | |
| 31 } // namespace content | |
| 24 | 32 |
| 25 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_ | 33 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_ |
| OLD | NEW |