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

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

Issue 2624783002: Fix movementX/Y attributes for touch pointer events (Closed)
Patch Set: Move the logic to InputRouterImpl Created 3 years, 10 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_INPUT_ROUTER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_
7 7
8 #include "content/browser/renderer_host/event_with_latency_info.h" 8 #include "content/browser/renderer_host/event_with_latency_info.h"
9 #include "content/common/input/input_event_ack_state.h" 9 #include "content/common/input/input_event_ack_state.h"
10 #include "content/public/browser/native_web_keyboard_event.h" 10 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // WebInputEvents 29 // WebInputEvents
30 virtual void SendMouseEvent( 30 virtual void SendMouseEvent(
31 const MouseEventWithLatencyInfo& mouse_event) = 0; 31 const MouseEventWithLatencyInfo& mouse_event) = 0;
32 virtual void SendWheelEvent( 32 virtual void SendWheelEvent(
33 const MouseWheelEventWithLatencyInfo& wheel_event) = 0; 33 const MouseWheelEventWithLatencyInfo& wheel_event) = 0;
34 virtual void SendKeyboardEvent( 34 virtual void SendKeyboardEvent(
35 const NativeWebKeyboardEventWithLatencyInfo& key_event) = 0; 35 const NativeWebKeyboardEventWithLatencyInfo& key_event) = 0;
36 virtual void SendGestureEvent( 36 virtual void SendGestureEvent(
37 const GestureEventWithLatencyInfo& gesture_event) = 0; 37 const GestureEventWithLatencyInfo& gesture_event) = 0;
38 virtual void SendTouchEvent( 38 virtual void SendTouchEvent(TouchEventWithLatencyInfo touch_event) = 0;
sadrul 2017/02/09 03:11:34 I suggest keep this a const-ref, and make a copy i
39 const TouchEventWithLatencyInfo& touch_event) = 0;
40 39
41 // Returns the oldest queued or in-flight keyboard event sent to the router. 40 // Returns the oldest queued or in-flight keyboard event sent to the router.
42 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const = 0; 41 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const = 0;
43 42
44 // Notify the router about whether the current page is mobile-optimized (i.e., 43 // Notify the router about whether the current page is mobile-optimized (i.e.,
45 // the site has a mobile-friendly viewport). 44 // the site has a mobile-friendly viewport).
46 virtual void NotifySiteIsMobileOptimized(bool is_mobile_optimized) = 0; 45 virtual void NotifySiteIsMobileOptimized(bool is_mobile_optimized) = 0;
47 46
48 // Request a notification from the input router when all events have been 47 // Request a notification from the input router when all events have been
49 // fully dispatched and there are no longer any pending events. 48 // fully dispatched and there are no longer any pending events.
50 // Note: This may trigger a synchronous notification if the router is empty. 49 // Note: This may trigger a synchronous notification if the router is empty.
51 virtual void RequestNotificationWhenFlushed() = 0; 50 virtual void RequestNotificationWhenFlushed() = 0;
52 51
53 // Whether there are any events pending dispatch to or ack from the renderer. 52 // Whether there are any events pending dispatch to or ack from the renderer.
54 virtual bool HasPendingEvents() const = 0; 53 virtual bool HasPendingEvents() const = 0;
55 54
56 // A scale factor to scale the coordinate in WebInputEvent from DIP 55 // A scale factor to scale the coordinate in WebInputEvent from DIP
57 // to viewport. 56 // to viewport.
58 virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; 57 virtual void SetDeviceScaleFactor(float device_scale_factor) = 0;
59 58
60 // Sets the frame tree node id of associated frame, used when tracing 59 // Sets the frame tree node id of associated frame, used when tracing
61 // input event latencies to relate events to their target frames. 60 // input event latencies to relate events to their target frames.
62 virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0; 61 virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0;
63 }; 62 };
64 63
65 } // namespace content 64 } // namespace content
66 65
67 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ 66 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698