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

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

Issue 2914083002: Move InputRouterImpl::Config to InputRouter::Config (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_config_helper.h » ('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 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/browser/renderer_host/input/gesture_event_queue.h"
10 #include "content/browser/renderer_host/input/touch_event_queue.h"
9 #include "content/common/input/input_event_ack_state.h" 11 #include "content/common/input/input_event_ack_state.h"
10 #include "content/public/browser/native_web_keyboard_event.h" 12 #include "content/public/browser/native_web_keyboard_event.h"
11 #include "ipc/ipc_listener.h" 13 #include "ipc/ipc_listener.h"
12 #include "third_party/WebKit/public/platform/WebInputEvent.h" 14 #include "third_party/WebKit/public/platform/WebInputEvent.h"
13 15
14 namespace content { 16 namespace content {
15 17
16 // The InputRouter allows the embedder to customize how input events are 18 // The InputRouter allows the embedder to customize how input events are
17 // sent to the renderer, and how responses are dispatched to the browser. 19 // sent to the renderer, and how responses are dispatched to the browser.
18 // While the router should respect the relative order in which events are 20 // While the router should respect the relative order in which events are
19 // received, it is free to customize when those events are dispatched. 21 // received, it is free to customize when those events are dispatched.
20 class InputRouter : public IPC::Listener { 22 class InputRouter : public IPC::Listener {
21 public: 23 public:
24 struct CONTENT_EXPORT Config {
25 Config();
26 GestureEventQueue::Config gesture_config;
27 TouchEventQueue::Config touch_config;
28 };
29
22 ~InputRouter() override {} 30 ~InputRouter() override {}
23 31
24 // Send and take ownership of the the given InputMsg_*. This should be used 32 // Send and take ownership of the the given InputMsg_*. This should be used
25 // only for event types not associated with a WebInputEvent. Returns true on 33 // only for event types not associated with a WebInputEvent. Returns true on
26 // success and false otherwise. 34 // success and false otherwise.
27 virtual bool SendInput(std::unique_ptr<IPC::Message> message) = 0; 35 virtual bool SendInput(std::unique_ptr<IPC::Message> message) = 0;
28 36
29 // WebInputEvents 37 // WebInputEvents
30 virtual void SendMouseEvent( 38 virtual void SendMouseEvent(
31 const MouseEventWithLatencyInfo& mouse_event) = 0; 39 const MouseEventWithLatencyInfo& mouse_event) = 0;
(...skipping 21 matching lines...) Expand all
53 virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; 61 virtual void SetDeviceScaleFactor(float device_scale_factor) = 0;
54 62
55 // Sets the frame tree node id of associated frame, used when tracing 63 // Sets the frame tree node id of associated frame, used when tracing
56 // input event latencies to relate events to their target frames. 64 // input event latencies to relate events to their target frames.
57 virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0; 65 virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0;
58 }; 66 };
59 67
60 } // namespace content 68 } // namespace content
61 69
62 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_ 70 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_config_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698