| OLD | NEW |
| 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/devtools_domain_handler.h" |
| 11 #include "content/browser/devtools/protocol/input.h" | 11 #include "content/browser/devtools/protocol/input.h" |
| 12 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 12 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
| 13 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 13 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
| 14 #include "content/public/browser/render_widget_host.h" | 14 #include "content/public/browser/render_widget_host.h" |
| 15 #include "ui/gfx/geometry/size_f.h" | 15 #include "ui/gfx/geometry/size_f.h" |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 class CompositorFrameMetadata; | 18 class CompositorFrameMetadata; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 23 class DevToolsSession; | 23 class DevToolsAgentHostImpl; |
| 24 class RenderFrameHostImpl; | 24 class RenderFrameHostImpl; |
| 25 | 25 |
| 26 namespace protocol { | 26 namespace protocol { |
| 27 | 27 |
| 28 class InputHandler : public DevToolsDomainHandler, | 28 class InputHandler : public DevToolsDomainHandler, |
| 29 public Input::Backend, | 29 public Input::Backend, |
| 30 public RenderWidgetHost::InputEventObserver { | 30 public RenderWidgetHost::InputEventObserver { |
| 31 public: | 31 public: |
| 32 InputHandler(); | 32 InputHandler(); |
| 33 ~InputHandler() override; | 33 ~InputHandler() override; |
| 34 | 34 |
| 35 static InputHandler* FromSession(DevToolsSession* session); | 35 static std::vector<InputHandler*> ForAgentHost(DevToolsAgentHostImpl* host); |
| 36 | 36 |
| 37 void Wire(UberDispatcher* dispatcher) override; | 37 void Wire(UberDispatcher* dispatcher) override; |
| 38 void SetRenderFrameHost(RenderFrameHostImpl* host) override; | 38 void SetRenderFrameHost(RenderFrameHostImpl* host) override; |
| 39 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); | 39 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); |
| 40 Response Disable() override; | 40 Response Disable() override; |
| 41 | 41 |
| 42 void DispatchKeyEvent( | 42 void DispatchKeyEvent( |
| 43 const std::string& type, | 43 const std::string& type, |
| 44 Maybe<int> modifiers, | 44 Maybe<int> modifiers, |
| 45 Maybe<double> timestamp, | 45 Maybe<double> timestamp, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 int last_id_; | 142 int last_id_; |
| 143 base::WeakPtrFactory<InputHandler> weak_factory_; | 143 base::WeakPtrFactory<InputHandler> weak_factory_; |
| 144 | 144 |
| 145 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 145 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace protocol | 148 } // namespace protocol |
| 149 } // namespace content | 149 } // namespace content |
| 150 | 150 |
| 151 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ | 151 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ |
| OLD | NEW |