| 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 InspectorEmulationAgent_h | 5 #ifndef InspectorEmulationAgent_h |
| 6 #define InspectorEmulationAgent_h | 6 #define InspectorEmulationAgent_h |
| 7 | 7 |
| 8 #include "core/inspector/InspectorBaseAgent.h" | 8 #include "core/inspector/InspectorBaseAgent.h" |
| 9 #include "core/inspector/protocol/Emulation.h" | 9 #include "core/inspector/protocol/Emulation.h" |
| 10 #include "platform/WebTaskRunner.h" | 10 #include "platform/WebTaskRunner.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 public: | 29 public: |
| 30 virtual ~Client() {} | 30 virtual ~Client() {} |
| 31 | 31 |
| 32 virtual void setCPUThrottlingRate(double rate) {} | 32 virtual void setCPUThrottlingRate(double rate) {} |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 static InspectorEmulationAgent* create(WebLocalFrameImpl*, Client*); | 35 static InspectorEmulationAgent* create(WebLocalFrameImpl*, Client*); |
| 36 ~InspectorEmulationAgent() override; | 36 ~InspectorEmulationAgent() override; |
| 37 | 37 |
| 38 // protocol::Dispatcher::EmulationCommandHandler implementation. | 38 // protocol::Dispatcher::EmulationCommandHandler implementation. |
| 39 Response forceViewport(double x, double y, double scale) override; | 39 protocol::Response forceViewport(double x, double y, double scale) override; |
| 40 Response resetViewport() override; | 40 protocol::Response resetViewport() override; |
| 41 Response resetPageScaleFactor() override; | 41 protocol::Response resetPageScaleFactor() override; |
| 42 Response setPageScaleFactor(double) override; | 42 protocol::Response setPageScaleFactor(double) override; |
| 43 Response setScriptExecutionDisabled(bool value) override; | 43 protocol::Response setScriptExecutionDisabled(bool value) override; |
| 44 Response setTouchEmulationEnabled(bool enabled, | 44 protocol::Response setTouchEmulationEnabled( |
| 45 Maybe<String> configuration) override; | 45 bool enabled, |
| 46 Response setEmulatedMedia(const String&) override; | 46 protocol::Maybe<String> configuration) override; |
| 47 Response setCPUThrottlingRate(double) override; | 47 protocol::Response setEmulatedMedia(const String&) override; |
| 48 Response setVirtualTimePolicy(const String& policy, | 48 protocol::Response setCPUThrottlingRate(double) override; |
| 49 Maybe<int> virtualTimeBudgetMs) override; | 49 protocol::Response setVirtualTimePolicy( |
| 50 Response setDefaultBackgroundColorOverride( | 50 const String& policy, |
| 51 Maybe<protocol::DOM::RGBA>) override; | 51 protocol::Maybe<int> virtualTimeBudgetMs) override; |
| 52 protocol::Response setDefaultBackgroundColorOverride( |
| 53 protocol::Maybe<protocol::DOM::RGBA>) override; |
| 52 | 54 |
| 53 // InspectorBaseAgent overrides. | 55 // InspectorBaseAgent overrides. |
| 54 Response disable() override; | 56 protocol::Response disable() override; |
| 55 void restore() override; | 57 void restore() override; |
| 56 | 58 |
| 57 DECLARE_VIRTUAL_TRACE(); | 59 DECLARE_VIRTUAL_TRACE(); |
| 58 | 60 |
| 59 private: | 61 private: |
| 60 InspectorEmulationAgent(WebLocalFrameImpl*, Client*); | 62 InspectorEmulationAgent(WebLocalFrameImpl*, Client*); |
| 61 WebViewImpl* webViewImpl(); | 63 WebViewImpl* webViewImpl(); |
| 62 void virtualTimeBudgetExpired(); | 64 void virtualTimeBudgetExpired(); |
| 63 | 65 |
| 64 Member<WebLocalFrameImpl> m_webLocalFrameImpl; | 66 Member<WebLocalFrameImpl> m_webLocalFrameImpl; |
| 65 Client* m_client; | 67 Client* m_client; |
| 66 TaskHandle m_virtualTimeBudgetExpiredTaskHandle; | 68 TaskHandle m_virtualTimeBudgetExpiredTaskHandle; |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 } // namespace blink | 71 } // namespace blink |
| 70 | 72 |
| 71 #endif // !defined(InspectorEmulationAgent_h) | 73 #endif // !defined(InspectorEmulationAgent_h) |
| OLD | NEW |