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" |
11 #include "ipc/ipc_listener.h" | 11 #include "ipc/ipc_listener.h" |
12 #include "third_party/WebKit/public/web/WebInputEvent.h" | 12 #include "third_party/WebKit/public/web/WebInputEvent.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 class InputRouterClient; | |
17 | |
18 // The InputRouter allows the embedder to customize how input events are | 16 // The InputRouter allows the embedder to customize how input events are |
19 // sent to the renderer, and how responses are dispatched to the browser. | 17 // sent to the renderer, and how responses are dispatched to the browser. |
20 // While the router should respect the relative order in which events are | 18 // While the router should respect the relative order in which events are |
21 // received, it is free to customize when those events are dispatched. | 19 // received, it is free to customize when those events are dispatched. |
22 class InputRouter : public IPC::Listener { | 20 class InputRouter : public IPC::Listener { |
23 public: | 21 public: |
24 ~InputRouter() override {} | 22 ~InputRouter() override {} |
25 | 23 |
26 // Send and take ownership of the the given InputMsg_*. This should be used | 24 // Send and take ownership of the the given InputMsg_*. This should be used |
27 // only for event types not associated with a WebInputEvent. Returns true on | 25 // only for event types not associated with a WebInputEvent. Returns true on |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; | 58 virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; |
61 | 59 |
62 // Sets the frame tree node id of associated frame, used when tracing | 60 // Sets the frame tree node id of associated frame, used when tracing |
63 // input event latencies to relate events to their target frames. | 61 // input event latencies to relate events to their target frames. |
64 virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0; | 62 virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0; |
65 }; | 63 }; |
66 | 64 |
67 } // namespace content | 65 } // namespace content |
68 | 66 |
69 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ | 67 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ |
OLD | NEW |