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

Side by Side Diff: ui/events/blink/blink_event_util.h

Issue 2860793003: Pass through tilt_x and tilt_y to blink (Closed)
Patch Set: Pass through tilt_x and tilt_y to blink Created 3 years, 7 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
« no previous file with comments | « ui/events/android/motion_event_android_unittest.cc ('k') | ui/events/blink/blink_event_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ 5 #ifndef UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_
6 #define UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ 6 #define UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "third_party/WebKit/public/platform/WebGestureEvent.h" 10 #include "third_party/WebKit/public/platform/WebGestureEvent.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const gfx::Vector2d& delta, 70 const gfx::Vector2d& delta,
71 float scale); 71 float scale);
72 72
73 blink::WebInputEvent::Type ToWebMouseEventType(MotionEvent::Action action); 73 blink::WebInputEvent::Type ToWebMouseEventType(MotionEvent::Action action);
74 74
75 void SetWebPointerPropertiesFromMotionEventData( 75 void SetWebPointerPropertiesFromMotionEventData(
76 blink::WebPointerProperties& webPointerProperties, 76 blink::WebPointerProperties& webPointerProperties,
77 int pointer_id, 77 int pointer_id,
78 float pressure, 78 float pressure,
79 float orientation_rad, 79 float orientation_rad,
80 float tilt_rad, 80 float tilt_x,
81 float tilt_y,
81 int android_buttons_changed, 82 int android_buttons_changed,
82 int tool_type); 83 int tool_type);
83 84
84 int WebEventModifiersToEventFlags(int modifiers); 85 int WebEventModifiersToEventFlags(int modifiers);
85 86
86 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( 87 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers(
87 ui::DomCode code); 88 ui::DomCode code);
88 89
89 bool IsGestureScrollOrFlingOrPinch(blink::WebInputEvent::Type); 90 bool IsGestureScrollOrFlingOrPinch(blink::WebInputEvent::Type);
90 91
91 bool IsContinuousGestureEvent(blink::WebInputEvent::Type); 92 bool IsContinuousGestureEvent(blink::WebInputEvent::Type);
92 93
93 inline const blink::WebGestureEvent& ToWebGestureEvent( 94 inline const blink::WebGestureEvent& ToWebGestureEvent(
94 const blink::WebInputEvent& event) { 95 const blink::WebInputEvent& event) {
95 DCHECK(blink::WebInputEvent::IsGestureEventType(event.GetType())); 96 DCHECK(blink::WebInputEvent::IsGestureEventType(event.GetType()));
96 return static_cast<const blink::WebGestureEvent&>(event); 97 return static_cast<const blink::WebGestureEvent&>(event);
97 } 98 }
98 99
99 } // namespace ui 100 } // namespace ui
100 101
101 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ 102 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_
OLDNEW
« no previous file with comments | « ui/events/android/motion_event_android_unittest.cc ('k') | ui/events/blink/blink_event_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698