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

Unified Diff: third_party/WebKit/Source/web/InspectorEmulationAgent.h

Issue 1521113002: DevTools: Initial implementation of slow CPU emulation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 4 landing Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/InspectorEmulationAgent.h
diff --git a/third_party/WebKit/Source/web/InspectorEmulationAgent.h b/third_party/WebKit/Source/web/InspectorEmulationAgent.h
index 4e87a7db0e7f91a59298e18f41b056d6acbf2f23..b25ba847461295ba74da61d088e93eb00fd79025 100644
--- a/third_party/WebKit/Source/web/InspectorEmulationAgent.h
+++ b/third_party/WebKit/Source/web/InspectorEmulationAgent.h
@@ -18,7 +18,14 @@ using ErrorString = String;
class InspectorEmulationAgent final : public InspectorBaseAgent<InspectorEmulationAgent, InspectorFrontend::Emulation>, public InspectorBackendDispatcher::EmulationCommandHandler {
WTF_MAKE_NONCOPYABLE(InspectorEmulationAgent);
public:
- static PassOwnPtrWillBeRawPtr<InspectorEmulationAgent> create(WebLocalFrameImpl*);
+ class Client {
+ public:
+ virtual ~Client() {}
+
+ virtual void setCPUThrottlingRate(double rate) {}
+ };
+
+ static PassOwnPtrWillBeRawPtr<InspectorEmulationAgent> create(WebLocalFrameImpl*, Client*);
~InspectorEmulationAgent() override;
void viewportChanged();
@@ -29,6 +36,7 @@ public:
void setScriptExecutionDisabled(ErrorString*, bool) override;
void setTouchEmulationEnabled(ErrorString*, bool enabled, const String* configuration) override;
void setEmulatedMedia(ErrorString*, const String&) override;
+ void setCPUThrottlingRate(ErrorString*, double rate) override;
// InspectorBaseAgent overrides.
void disable(ErrorString*) override;
@@ -39,14 +47,13 @@ public:
DECLARE_VIRTUAL_TRACE();
private:
- explicit InspectorEmulationAgent(WebLocalFrameImpl*);
+ InspectorEmulationAgent(WebLocalFrameImpl*, Client*);
WebViewImpl* webViewImpl();
RawPtrWillBeMember<WebLocalFrameImpl> m_webLocalFrameImpl;
+ Client* m_client;
};
-
} // namespace blink
-
#endif // !defined(InspectorEmulationAgent_h)
« no previous file with comments | « third_party/WebKit/Source/devtools/protocol.json ('k') | third_party/WebKit/Source/web/InspectorEmulationAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698