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

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

Issue 718153002: Indicate whether a touch event will cause scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "third_party/WebKit/public/web/WebInputEvent.h" 9 #include "third_party/WebKit/public/web/WebInputEvent.h"
10 #include "ui/events/keycodes/keyboard_codes.h" 10 #include "ui/events/keycodes/keyboard_codes.h"
11 11
12 namespace ui { 12 namespace ui {
13 struct GestureEventData; 13 struct GestureEventData;
14 class MotionEvent; 14 class MotionEvent;
15 } 15 }
16 16
17 namespace content { 17 namespace content {
18 18
19 // Update |event|'s windowsKeyCode and keyIdentifer properties using the 19 // Update |event|'s windowsKeyCode and keyIdentifer properties using the
20 // provided |windows_key_code|. 20 // provided |windows_key_code|.
21 CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier( 21 CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier(
22 blink::WebKeyboardEvent* event, 22 blink::WebKeyboardEvent* event,
23 ui::KeyboardCode windows_key_code); 23 ui::KeyboardCode windows_key_code);
24 24
25 // Creates a WebTouchEvent from |event|, scaling all size components from 25 // Creates a WebTouchEvent from |event|.
26 // |event| by |scale|.
27 CONTENT_EXPORT blink::WebTouchEvent CreateWebTouchEventFromMotionEvent( 26 CONTENT_EXPORT blink::WebTouchEvent CreateWebTouchEventFromMotionEvent(
28 const ui::MotionEvent& event); 27 const ui::MotionEvent& event, bool causes_scrolling);
29 28
30 // Creates a WebGestureEvent from |event|, scaling all size components from 29 // Creates a WebGestureEvent from |event|.
31 // |event| by |scale|.
32 CONTENT_EXPORT blink::WebGestureEvent CreateWebGestureEventFromGestureEventData( 30 CONTENT_EXPORT blink::WebGestureEvent CreateWebGestureEventFromGestureEventData(
33 const ui::GestureEventData& data); 31 const ui::GestureEventData& data);
34 32
35 int EventFlagsToWebEventModifiers(int flags); 33 int EventFlagsToWebEventModifiers(int flags);
36 34
37 int WebEventModifiersToEventFlags(int modifiers); 35 int WebEventModifiersToEventFlags(int modifiers);
38 36
39 } // namespace content 37 } // namespace content
40 38
41 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_ 39 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698