| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_EMULATION_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
| 9 #include "content/browser/devtools/protocol/emulation.h" | 10 #include "content/browser/devtools/protocol/emulation.h" |
| 10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" | 11 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 class RenderFrameHostImpl; | 15 class RenderFrameHostImpl; |
| 15 class WebContentsImpl; | 16 class WebContentsImpl; |
| 16 | 17 |
| 17 namespace protocol { | 18 namespace protocol { |
| 18 | 19 |
| 19 class EmulationHandler : public Emulation::Backend { | 20 class EmulationHandler : public DevToolsDomainHandler, |
| 21 public Emulation::Backend { |
| 20 public: | 22 public: |
| 21 EmulationHandler(); | 23 EmulationHandler(); |
| 22 ~EmulationHandler() override; | 24 ~EmulationHandler() override; |
| 23 | 25 |
| 24 void SetRenderFrameHost(RenderFrameHostImpl* host); | 26 void Wire(UberDispatcher* dispatcher) override; |
| 25 void Wire(UberDispatcher*); | 27 void SetRenderFrameHost(RenderFrameHostImpl* host) override; |
| 26 Response Disable() override; | 28 Response Disable() override; |
| 27 | 29 |
| 28 Response SetGeolocationOverride(Maybe<double> latitude, | 30 Response SetGeolocationOverride(Maybe<double> latitude, |
| 29 Maybe<double> longitude, | 31 Maybe<double> longitude, |
| 30 Maybe<double> accuracy) override; | 32 Maybe<double> accuracy) override; |
| 31 Response ClearGeolocationOverride() override; | 33 Response ClearGeolocationOverride() override; |
| 32 | 34 |
| 33 Response SetTouchEmulationEnabled(bool enabled, | 35 Response SetTouchEmulationEnabled(bool enabled, |
| 34 Maybe<std::string> configuration) override; | 36 Maybe<std::string> configuration) override; |
| 35 | 37 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 65 | 67 |
| 66 RenderFrameHostImpl* host_; | 68 RenderFrameHostImpl* host_; |
| 67 | 69 |
| 68 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); | 70 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 } // namespace protocol | 73 } // namespace protocol |
| 72 } // namespace content | 74 } // namespace content |
| 73 | 75 |
| 74 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ | 76 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ |
| OLD | NEW |