| 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 | 10 | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 21     public: | 21     public: | 
| 22         virtual ~Client() {} | 22         virtual ~Client() {} | 
| 23 | 23 | 
| 24         virtual void setCPUThrottlingRate(double rate) {} | 24         virtual void setCPUThrottlingRate(double rate) {} | 
| 25     }; | 25     }; | 
| 26 | 26 | 
| 27     static InspectorEmulationAgent* create(WebLocalFrameImpl*, Client*); | 27     static InspectorEmulationAgent* create(WebLocalFrameImpl*, Client*); | 
| 28     ~InspectorEmulationAgent() override; | 28     ~InspectorEmulationAgent() override; | 
| 29 | 29 | 
| 30     // protocol::Dispatcher::EmulationCommandHandler implementation. | 30     // protocol::Dispatcher::EmulationCommandHandler implementation. | 
|  | 31     void setCompositedAreaOverride(ErrorString*, double in_x, double in_y, doubl
    e in_width, double in_height, const Maybe<double>& in_scale) override; | 
|  | 32     void clearCompositedAreaOverride(ErrorString*) override; | 
| 31     void resetPageScaleFactor(ErrorString*) override; | 33     void resetPageScaleFactor(ErrorString*) override; | 
| 32     void setPageScaleFactor(ErrorString*, double in_pageScaleFactor) override; | 34     void setPageScaleFactor(ErrorString*, double in_pageScaleFactor) override; | 
| 33     void setScriptExecutionDisabled(ErrorString*, bool in_value) override; | 35     void setScriptExecutionDisabled(ErrorString*, bool in_value) override; | 
| 34     void setTouchEmulationEnabled(ErrorString*, bool in_enabled, const protocol:
    :Maybe<String>& in_configuration) override; | 36     void setTouchEmulationEnabled(ErrorString*, bool in_enabled, const protocol:
    :Maybe<String>& in_configuration) override; | 
| 35     void setEmulatedMedia(ErrorString*, const String& in_media) override; | 37     void setEmulatedMedia(ErrorString*, const String& in_media) override; | 
| 36     void setCPUThrottlingRate(ErrorString*, double in_rate) override; | 38     void setCPUThrottlingRate(ErrorString*, double in_rate) override; | 
| 37     void setVirtualTimePolicy(ErrorString*, const String& in_policy, const proto
    col::Maybe<int>& in_virtualTimeBudgetMs) override; | 39     void setVirtualTimePolicy(ErrorString*, const String& in_policy, const proto
    col::Maybe<int>& in_virtualTimeBudgetMs) override; | 
| 38 | 40 | 
| 39     // InspectorBaseAgent overrides. | 41     // InspectorBaseAgent overrides. | 
| 40     void disable(ErrorString*) override; | 42     void disable(ErrorString*) override; | 
| 41     void restore() override; | 43     void restore() override; | 
| 42 | 44 | 
| 43     DECLARE_VIRTUAL_TRACE(); | 45     DECLARE_VIRTUAL_TRACE(); | 
| 44 | 46 | 
| 45 private: | 47 private: | 
| 46     InspectorEmulationAgent(WebLocalFrameImpl*, Client*); | 48     InspectorEmulationAgent(WebLocalFrameImpl*, Client*); | 
| 47     WebViewImpl* webViewImpl(); | 49     WebViewImpl* webViewImpl(); | 
| 48     void virtualTimeBudgetExpired(); | 50     void virtualTimeBudgetExpired(); | 
| 49 | 51 | 
| 50     Member<WebLocalFrameImpl> m_webLocalFrameImpl; | 52     Member<WebLocalFrameImpl> m_webLocalFrameImpl; | 
| 51     Client* m_client; | 53     Client* m_client; | 
| 52     std::unique_ptr<CancellableTaskFactory> m_virtualTimeBudgetExpiredTask; | 54     std::unique_ptr<CancellableTaskFactory> m_virtualTimeBudgetExpiredTask; | 
| 53 }; | 55 }; | 
| 54 | 56 | 
| 55 } // namespace blink | 57 } // namespace blink | 
| 56 | 58 | 
| 57 #endif // !defined(InspectorEmulationAgent_h) | 59 #endif // !defined(InspectorEmulationAgent_h) | 
| OLD | NEW | 
|---|