Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / content / browser / renderer_host / input / web_input_event_util.h
blob4143a1cbce4ebff2b8d29930ee458a3bb8bf9afc
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_
8 #include "content/common/content_export.h"
9 #include "third_party/WebKit/public/web/WebInputEvent.h"
10 #include "ui/events/keycodes/keyboard_codes.h"
12 namespace ui {
13 struct GestureEventData;
14 class MotionEvent;
17 namespace content {
19 // Update |event|'s windowsKeyCode and keyIdentifer properties using the
20 // provided |windows_key_code|.
21 CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier(
22 blink::WebKeyboardEvent* event,
23 ui::KeyboardCode windows_key_code);
25 // Creates a WebTouchEvent from |event|, scaling all size components from
26 // |event| by |scale|.
27 CONTENT_EXPORT blink::WebTouchEvent CreateWebTouchEventFromMotionEvent(
28 const ui::MotionEvent& event);
30 // Creates a WebGestureEvent from |event|, scaling all size components from
31 // |event| by |scale|.
32 CONTENT_EXPORT blink::WebGestureEvent CreateWebGestureEventFromGestureEventData(
33 const ui::GestureEventData& data);
35 } // namespace content
37 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_