| Index: third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
|
| diff --git a/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp b/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
|
| index b879e210a53ca61c8e4d99d71e29def99eb73e62..3d5a278c09603eadc23b81a57cea0da0ea9da65e 100644
|
| --- a/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
|
| +++ b/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
|
| @@ -23,14 +23,15 @@ static const char touchEventEmulationEnabled[] = "touchEventEmulationEnabled";
|
| static const char emulatedMedia[] = "emulatedMedia";
|
| }
|
|
|
| -PassOwnPtrWillBeRawPtr<InspectorEmulationAgent> InspectorEmulationAgent::create(WebLocalFrameImpl* webLocalFrameImpl)
|
| +PassOwnPtrWillBeRawPtr<InspectorEmulationAgent> InspectorEmulationAgent::create(WebLocalFrameImpl* webLocalFrameImpl, Client* client)
|
| {
|
| - return adoptPtrWillBeNoop(new InspectorEmulationAgent(webLocalFrameImpl));
|
| + return adoptPtrWillBeNoop(new InspectorEmulationAgent(webLocalFrameImpl, client));
|
| }
|
|
|
| -InspectorEmulationAgent::InspectorEmulationAgent(WebLocalFrameImpl* webLocalFrameImpl)
|
| +InspectorEmulationAgent::InspectorEmulationAgent(WebLocalFrameImpl* webLocalFrameImpl, Client* client)
|
| : InspectorBaseAgent<InspectorEmulationAgent, InspectorFrontend::Emulation>("Emulation")
|
| , m_webLocalFrameImpl(webLocalFrameImpl)
|
| + , m_client(client)
|
| {
|
| webViewImpl()->devToolsEmulator()->setEmulationAgent(this);
|
| }
|
| @@ -99,6 +100,11 @@ void InspectorEmulationAgent::setEmulatedMedia(ErrorString*, const String& media
|
| webViewImpl()->page()->settings().setMediaTypeOverride(media);
|
| }
|
|
|
| +void InspectorEmulationAgent::setCPUThrottlingRate(ErrorString*, double throttlingRate)
|
| +{
|
| + m_client->setCPUThrottlingRate(throttlingRate);
|
| +}
|
| +
|
| void InspectorEmulationAgent::viewportChanged()
|
| {
|
| if (!webViewImpl()->devToolsEmulator()->deviceEmulationEnabled() || !frontend())
|
|
|