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

Side by Side Diff: content/browser/devtools/protocol/input_handler.h

Issue 2544893002: [DevTools] Migrate InputHandler from RenderWidgetHostImpl to RenderFrameHostImpl. (Closed)
Patch Set: Created 4 years 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/devtools/protocol/input_handler.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" 10 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
11 #include "content/browser/renderer_host/input/synthetic_gesture.h" 11 #include "content/browser/renderer_host/input/synthetic_gesture.h"
12 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" 12 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h"
13 #include "ui/gfx/geometry/size_f.h" 13 #include "ui/gfx/geometry/size_f.h"
14 14
15 namespace cc { 15 namespace cc {
16 class CompositorFrameMetadata; 16 class CompositorFrameMetadata;
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 20
21 class RenderWidgetHostImpl; 21 class RenderFrameHostImpl;
22 22
23 namespace devtools { 23 namespace devtools {
24 namespace input { 24 namespace input {
25 25
26 class InputHandler { 26 class InputHandler {
27 public: 27 public:
28 typedef DevToolsProtocolClient::Response Response; 28 typedef DevToolsProtocolClient::Response Response;
29 29
30 InputHandler(); 30 InputHandler();
31 virtual ~InputHandler(); 31 virtual ~InputHandler();
32 32
33 void SetRenderWidgetHost(RenderWidgetHostImpl* host); 33 void SetRenderFrameHost(RenderFrameHostImpl* host);
34 void SetClient(std::unique_ptr<Client> client); 34 void SetClient(std::unique_ptr<Client> client);
35 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); 35 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata);
36 36
37 Response DispatchKeyEvent(const std::string& type, 37 Response DispatchKeyEvent(const std::string& type,
38 const int* modifiers, 38 const int* modifiers,
39 const double* timestamp, 39 const double* timestamp,
40 const std::string* text, 40 const std::string* text,
41 const std::string* unmodified_text, 41 const std::string* unmodified_text,
42 const std::string* key_identifier, 42 const std::string* key_identifier,
43 const std::string* code, 43 const std::string* code,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 std::string interaction_marker_name, 118 std::string interaction_marker_name,
119 DevToolsCommandId command_id); 119 DevToolsCommandId command_id);
120 120
121 void OnScrollFinished(SyntheticSmoothScrollGestureParams gesture_params, 121 void OnScrollFinished(SyntheticSmoothScrollGestureParams gesture_params,
122 int repeat_count, 122 int repeat_count,
123 base::TimeDelta repeat_delay, 123 base::TimeDelta repeat_delay,
124 std::string interaction_marker_name, 124 std::string interaction_marker_name,
125 DevToolsCommandId command_id, 125 DevToolsCommandId command_id,
126 SyntheticGesture::Result result); 126 SyntheticGesture::Result result);
127 127
128 RenderWidgetHostImpl* host_; 128 RenderFrameHostImpl* host_;
129 std::unique_ptr<Client> client_; 129 std::unique_ptr<Client> client_;
130 float page_scale_factor_; 130 float page_scale_factor_;
131 gfx::SizeF scrollable_viewport_size_; 131 gfx::SizeF scrollable_viewport_size_;
132 base::WeakPtrFactory<InputHandler> weak_factory_; 132 base::WeakPtrFactory<InputHandler> weak_factory_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(InputHandler); 134 DISALLOW_COPY_AND_ASSIGN(InputHandler);
135 }; 135 };
136 136
137 } // namespace input 137 } // namespace input
138 } // namespace devtools 138 } // namespace devtools
139 } // namespace content 139 } // namespace content
140 140
141 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ 141 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/protocol/input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698