OLD | NEW |
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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/browser/renderer_host/event_with_latency_info.h" | 9 #include "content/browser/renderer_host/event_with_latency_info.h" |
10 #include "content/common/input/input_event_ack_state.h" | 10 #include "content/common/input/input_event_ack_state.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // only for event types not associated with a WebInputEvent. Returns true on | 28 // only for event types not associated with a WebInputEvent. Returns true on |
29 // success and false otherwise. | 29 // success and false otherwise. |
30 virtual bool SendInput(scoped_ptr<IPC::Message> message) = 0; | 30 virtual bool SendInput(scoped_ptr<IPC::Message> message) = 0; |
31 | 31 |
32 // WebInputEvents | 32 // WebInputEvents |
33 virtual void SendMouseEvent( | 33 virtual void SendMouseEvent( |
34 const MouseEventWithLatencyInfo& mouse_event) = 0; | 34 const MouseEventWithLatencyInfo& mouse_event) = 0; |
35 virtual void SendWheelEvent( | 35 virtual void SendWheelEvent( |
36 const MouseWheelEventWithLatencyInfo& wheel_event) = 0; | 36 const MouseWheelEventWithLatencyInfo& wheel_event) = 0; |
37 virtual void SendKeyboardEvent( | 37 virtual void SendKeyboardEvent( |
38 const NativeWebKeyboardEventWithLatencyInfo& key_event, | 38 const NativeWebKeyboardEventWithLatencyInfo& key_event) = 0; |
39 bool is_shortcut) = 0; | |
40 virtual void SendGestureEvent( | 39 virtual void SendGestureEvent( |
41 const GestureEventWithLatencyInfo& gesture_event) = 0; | 40 const GestureEventWithLatencyInfo& gesture_event) = 0; |
42 virtual void SendTouchEvent( | 41 virtual void SendTouchEvent( |
43 const TouchEventWithLatencyInfo& touch_event) = 0; | 42 const TouchEventWithLatencyInfo& touch_event) = 0; |
44 | 43 |
45 // Returns the oldest queued or in-flight keyboard event sent to the router. | 44 // Returns the oldest queued or in-flight keyboard event sent to the router. |
46 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const = 0; | 45 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const = 0; |
47 | 46 |
48 // Notify the router about whether the current page is mobile-optimized (i.e., | 47 // Notify the router about whether the current page is mobile-optimized (i.e., |
49 // the site has a mobile-friendly viewport). | 48 // the site has a mobile-friendly viewport). |
50 virtual void NotifySiteIsMobileOptimized(bool is_mobile_optimized) = 0; | 49 virtual void NotifySiteIsMobileOptimized(bool is_mobile_optimized) = 0; |
51 | 50 |
52 // Request a notification from the input router when all events have been | 51 // Request a notification from the input router when all events have been |
53 // fully dispatched and there are no longer any pending events. | 52 // fully dispatched and there are no longer any pending events. |
54 // Note: This may trigger a synchronous notification if the router is empty. | 53 // Note: This may trigger a synchronous notification if the router is empty. |
55 virtual void RequestNotificationWhenFlushed() = 0; | 54 virtual void RequestNotificationWhenFlushed() = 0; |
56 | 55 |
57 // Whether there are any events pending dispatch to or ack from the renderer. | 56 // Whether there are any events pending dispatch to or ack from the renderer. |
58 virtual bool HasPendingEvents() const = 0; | 57 virtual bool HasPendingEvents() const = 0; |
59 }; | 58 }; |
60 | 59 |
61 } // namespace content | 60 } // namespace content |
62 | 61 |
63 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ | 62 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ |
OLD | NEW |