| Index: content/renderer/devtools/devtools_agent.cc
|
| diff --git a/content/renderer/devtools/devtools_agent.cc b/content/renderer/devtools/devtools_agent.cc
|
| index 635acc18641098000005084b573e00275d3cb652..5f26681556c75fbdad97cbc841051a746639d224 100644
|
| --- a/content/renderer/devtools/devtools_agent.cc
|
| +++ b/content/renderer/devtools/devtools_agent.cc
|
| @@ -22,6 +22,7 @@
|
| #include "third_party/WebKit/public/web/WebConsoleMessage.h"
|
| #include "third_party/WebKit/public/web/WebDevToolsAgent.h"
|
| #include "third_party/WebKit/public/web/WebFrame.h"
|
| +#include "third_party/WebKit/public/web/WebSettings.h"
|
| #include "third_party/WebKit/public/web/WebView.h"
|
|
|
| #if defined(USE_TCMALLOC)
|
| @@ -144,6 +145,19 @@ void DevToolsAgent::setTraceEventCallback(TraceEventCallback cb) {
|
| }
|
| }
|
|
|
| +void DevToolsAgent::emulateDevice(
|
| + bool enabled,
|
| + const WebKit::WebSize& device_size,
|
| + const WebKit::WebRect& view_rect,
|
| + float device_scale_factor,
|
| + bool fit_to_view) {
|
| + RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view());
|
| + if (enabled && impl->webview())
|
| + impl->webview()->settings()->setForceCompositingMode(true);
|
| + impl->EmulateScreenMetrics(enabled, gfx::Size(device_size),
|
| + gfx::Rect(view_rect), device_scale_factor, fit_to_view);
|
| +}
|
| +
|
| #if defined(USE_TCMALLOC) && !defined(OS_WIN)
|
| static void AllocationVisitor(void* data, const void* ptr) {
|
| typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor;
|
|
|