| Index: content/renderer/devtools/devtools_agent.cc
|
| diff --git a/content/renderer/devtools/devtools_agent.cc b/content/renderer/devtools/devtools_agent.cc
|
| index 57f4337919356cecb1d7eba7c24b831f0af23270..5240de5760d66ee1afd80d483a775cd4479a5d70 100644
|
| --- a/content/renderer/devtools/devtools_agent.cc
|
| +++ b/content/renderer/devtools/devtools_agent.cc
|
| @@ -105,6 +105,10 @@ bool DevToolsAgent::OnMessageReceived(const IPC::Message& message) {
|
| IPC_MESSAGE_HANDLER(DevToolsAgentMsg_AddMessageToConsole,
|
| OnAddMessageToConsole)
|
| IPC_MESSAGE_HANDLER(DevToolsMsg_SetupDevToolsClient, OnSetupDevToolsClient)
|
| + IPC_MESSAGE_HANDLER(DevToolsMsg_EnableDeviceEmulation,
|
| + OnEnableDeviceEmulation)
|
| + IPC_MESSAGE_HANDLER(DevToolsMsg_DisableDeviceEmulation,
|
| + OnDisableDeviceEmulation)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -338,6 +342,15 @@ void DevToolsAgent::OnSetupDevToolsClient() {
|
| new DevToolsClient(main_render_frame_);
|
| }
|
|
|
| +void DevToolsAgent::OnEnableDeviceEmulation(
|
| + const blink::WebDeviceEmulationParams& params) {
|
| + GetRenderViewImpl()->EnableScreenMetricsEmulation(params);
|
| +}
|
| +
|
| +void DevToolsAgent::OnDisableDeviceEmulation() {
|
| + GetRenderViewImpl()->DisableScreenMetricsEmulation();
|
| +}
|
| +
|
| WebDevToolsAgent* DevToolsAgent::GetWebAgent() {
|
| WebView* web_view = main_render_frame_->GetRenderView()->GetWebView();
|
| if (!web_view)
|
|
|