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

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

Issue 2590293003: [DevTools] Rework DevToolsSession interaction with domain handlers. (Closed)
Patch Set: addressed comments 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
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_domain_handler.h"
10 #include "content/browser/devtools/protocol/input.h" 11 #include "content/browser/devtools/protocol/input.h"
11 #include "content/browser/renderer_host/input/synthetic_gesture.h" 12 #include "content/browser/renderer_host/input/synthetic_gesture.h"
12 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" 13 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h"
13 #include "ui/gfx/geometry/size_f.h" 14 #include "ui/gfx/geometry/size_f.h"
14 15
15 namespace cc { 16 namespace cc {
16 class CompositorFrameMetadata; 17 class CompositorFrameMetadata;
17 } 18 }
18 19
19 namespace content { 20 namespace content {
20 21
21 class RenderFrameHostImpl; 22 class RenderFrameHostImpl;
22 23
23 namespace protocol { 24 namespace protocol {
24 25
25 class InputHandler : public Input::Backend { 26 class InputHandler : public DevToolsDomainHandler,
27 public Input::Backend {
26 public: 28 public:
27 InputHandler(); 29 InputHandler();
28 ~InputHandler() override; 30 ~InputHandler() override;
29 31
30 void Wire(UberDispatcher*); 32 void Wire(UberDispatcher* dispatcher) override;
31 void SetRenderFrameHost(RenderFrameHostImpl* host); 33 void SetRenderFrameHost(RenderFrameHostImpl* host) override;
32 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); 34 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata);
33 Response Disable() override; 35 Response Disable() override;
34 36
35 Response DispatchKeyEvent(const std::string& type, 37 Response DispatchKeyEvent(const std::string& type,
36 Maybe<int> modifiers, 38 Maybe<int> modifiers,
37 Maybe<double> timestamp, 39 Maybe<double> timestamp,
38 Maybe<std::string> text, 40 Maybe<std::string> text,
39 Maybe<std::string> unmodified_text, 41 Maybe<std::string> unmodified_text,
40 Maybe<std::string> key_identifier, 42 Maybe<std::string> key_identifier,
41 Maybe<std::string> code, 43 Maybe<std::string> code,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 int last_id_; 121 int last_id_;
120 base::WeakPtrFactory<InputHandler> weak_factory_; 122 base::WeakPtrFactory<InputHandler> weak_factory_;
121 123
122 DISALLOW_COPY_AND_ASSIGN(InputHandler); 124 DISALLOW_COPY_AND_ASSIGN(InputHandler);
123 }; 125 };
124 126
125 } // namespace protocol 127 } // namespace protocol
126 } // namespace content 128 } // namespace content
127 129
128 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ 130 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698