| 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 "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 27 matching lines...) Expand all Loading... |
| 38 virtual void SendTouchEvent( | 38 virtual void SendTouchEvent( |
| 39 const TouchEventWithLatencyInfo& touch_event) = 0; | 39 const TouchEventWithLatencyInfo& touch_event) = 0; |
| 40 | 40 |
| 41 // Returns the oldest queued or in-flight keyboard event sent to the router. | 41 // Returns the oldest queued or in-flight keyboard event sent to the router. |
| 42 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const = 0; | 42 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const = 0; |
| 43 | 43 |
| 44 // Notify the router about whether the current page is mobile-optimized (i.e., | 44 // Notify the router about whether the current page is mobile-optimized (i.e., |
| 45 // the site has a mobile-friendly viewport). | 45 // the site has a mobile-friendly viewport). |
| 46 virtual void NotifySiteIsMobileOptimized(bool is_mobile_optimized) = 0; | 46 virtual void NotifySiteIsMobileOptimized(bool is_mobile_optimized) = 0; |
| 47 | 47 |
| 48 // Request a notification from the input router when all events have been | |
| 49 // fully dispatched and there are no longer any pending events. | |
| 50 // Note: This may trigger a synchronous notification if the router is empty. | |
| 51 virtual void RequestNotificationWhenFlushed() = 0; | |
| 52 | |
| 53 // Whether there are any events pending dispatch to or ack from the renderer. | 48 // Whether there are any events pending dispatch to or ack from the renderer. |
| 54 virtual bool HasPendingEvents() const = 0; | 49 virtual bool HasPendingEvents() const = 0; |
| 55 | 50 |
| 56 // A scale factor to scale the coordinate in WebInputEvent from DIP | 51 // A scale factor to scale the coordinate in WebInputEvent from DIP |
| 57 // to viewport. | 52 // to viewport. |
| 58 virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; | 53 virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; |
| 59 | 54 |
| 60 // Sets the frame tree node id of associated frame, used when tracing | 55 // Sets the frame tree node id of associated frame, used when tracing |
| 61 // input event latencies to relate events to their target frames. | 56 // input event latencies to relate events to their target frames. |
| 62 virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0; | 57 virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0; |
| 63 }; | 58 }; |
| 64 | 59 |
| 65 } // namespace content | 60 } // namespace content |
| 66 | 61 |
| 67 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ | 62 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ |
| OLD | NEW |