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

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

Issue 2054193002: Android mouse events shouldn't appear as TouchEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a test, etc. Created 4 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
« 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/WebInputEvent.h" 10 #include "third_party/WebKit/public/platform/WebInputEvent.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Transforms coordinates and other properties of |event|, by 55 // Transforms coordinates and other properties of |event|, by
56 // 1) translating / shifting by |delta| and 56 // 1) translating / shifting by |delta| and
57 // 2) scaling by |scale|. 57 // 2) scaling by |scale|.
58 // If |event| does not need to change, returns nullptr. 58 // If |event| does not need to change, returns nullptr.
59 // Otherwise, returns the transformed version of |event|. 59 // Otherwise, returns the transformed version of |event|.
60 std::unique_ptr<blink::WebInputEvent> TranslateAndScaleWebInputEvent( 60 std::unique_ptr<blink::WebInputEvent> TranslateAndScaleWebInputEvent(
61 const blink::WebInputEvent& event, 61 const blink::WebInputEvent& event,
62 const gfx::Vector2d& delta, 62 const gfx::Vector2d& delta,
63 float scale); 63 float scale);
64 64
65 blink::WebPointerProperties::PointerType ToWebPointerType( 65 blink::WebInputEvent::Type ToWebMouseEventType(MotionEvent::Action action);
66 MotionEvent::ToolType tool_type); 66
67 void SetWebPointerPropertiesFromMotionEventData(
68 blink::WebPointerProperties& webPointerProperties,
69 int pointer_id,
70 float pressure,
71 float orientation_rad,
72 float tilt_rad,
73 int android_buttons_changed,
74 int tool_type);
67 75
68 int WebEventModifiersToEventFlags(int modifiers); 76 int WebEventModifiersToEventFlags(int modifiers);
69 77
70 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( 78 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers(
71 ui::DomCode code); 79 ui::DomCode code);
72 80
73 } // namespace ui 81 } // namespace ui
74 82
75 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ 83 #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