Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: content/browser/renderer_host/input/web_input_event_util.h

Issue 1034713004: Refactors gesture conversion functions to ui/events/blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: specific dep Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/web/WebInputEvent.h" 10 #include "third_party/WebKit/public/web/WebInputEvent.h"
11 #include "ui/events/keycodes/keyboard_codes.h" 11 #include "ui/events/keycodes/keyboard_codes.h"
12 12
13 namespace ui { 13 namespace ui {
14 struct GestureEventData; 14 struct GestureEventData;
15 struct GestureEventDetails; 15 struct GestureEventDetails;
16 class MotionEvent; 16 class MotionEvent;
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 20
21 // Update |event|'s windowsKeyCode and keyIdentifer properties using the 21 // Update |event|'s windowsKeyCode and keyIdentifer properties using the
22 // provided |windows_key_code|. 22 // provided |windows_key_code|.
23 CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier( 23 CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier(
24 blink::WebKeyboardEvent* event, 24 blink::WebKeyboardEvent* event,
25 ui::KeyboardCode windows_key_code); 25 ui::KeyboardCode windows_key_code);
26 26
27 CONTENT_EXPORT blink::WebTouchEvent CreateWebTouchEventFromMotionEvent(
28 const ui::MotionEvent& event, bool may_cause_scrolling);
29
30 CONTENT_EXPORT blink::WebGestureEvent CreateWebGestureEvent(
31 const ui::GestureEventDetails& details,
32 base::TimeDelta timestamp,
33 const gfx::PointF& location,
34 const gfx::PointF& raw_location,
35 int flags);
36
37 // Convenience wrapper for |CreateWebGestureEvent| using the supplied |data|.
38 CONTENT_EXPORT blink::WebGestureEvent
39 CreateWebGestureEventFromGestureEventData(const ui::GestureEventData& data);
40
41 int EventFlagsToWebEventModifiers(int flags);
42
43 int WebEventModifiersToEventFlags(int modifiers); 27 int WebEventModifiersToEventFlags(int modifiers);
44 28
45 } // namespace content 29 } // namespace content
46 30
47 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_ 31 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/touch_emulator.cc ('k') | content/browser/renderer_host/input/web_input_event_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698