| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/renderer/devtools/devtools_agent.h" | 5 #include "content/renderer/devtools/devtools_agent.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); | 241 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); |
| 242 impl->webview()->settings()->setForceCompositingMode(true); | 242 impl->webview()->settings()->setForceCompositingMode(true); |
| 243 impl->EnableScreenMetricsEmulation(params); | 243 impl->EnableScreenMetricsEmulation(params); |
| 244 } | 244 } |
| 245 | 245 |
| 246 void DevToolsAgent::disableDeviceEmulation() { | 246 void DevToolsAgent::disableDeviceEmulation() { |
| 247 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); | 247 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); |
| 248 impl->DisableScreenMetricsEmulation(); | 248 impl->DisableScreenMetricsEmulation(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void DevToolsAgent::setTouchEventEmulationEnabled(bool enabled) { |
| 252 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); |
| 253 impl->Send(new ViewHostMsg_SetTouchEventEmulationEnabled( |
| 254 impl->routing_id(), enabled)); |
| 255 } |
| 256 |
| 251 #if defined(USE_TCMALLOC) && !defined(OS_WIN) | 257 #if defined(USE_TCMALLOC) && !defined(OS_WIN) |
| 252 static void AllocationVisitor(void* data, const void* ptr) { | 258 static void AllocationVisitor(void* data, const void* ptr) { |
| 253 typedef blink::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor; | 259 typedef blink::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor; |
| 254 Visitor* visitor = reinterpret_cast<Visitor*>(data); | 260 Visitor* visitor = reinterpret_cast<Visitor*>(data); |
| 255 visitor->visitObject(ptr); | 261 visitor->visitObject(ptr); |
| 256 } | 262 } |
| 257 #endif | 263 #endif |
| 258 | 264 |
| 259 void DevToolsAgent::visitAllocatedObjects(AllocatedObjectVisitor* visitor) { | 265 void DevToolsAgent::visitAllocatedObjects(AllocatedObjectVisitor* visitor) { |
| 260 #if defined(USE_TCMALLOC) && !defined(OS_WIN) | 266 #if defined(USE_TCMALLOC) && !defined(OS_WIN) |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 if (!web_view) | 366 if (!web_view) |
| 361 return NULL; | 367 return NULL; |
| 362 return web_view->devToolsAgent(); | 368 return web_view->devToolsAgent(); |
| 363 } | 369 } |
| 364 | 370 |
| 365 bool DevToolsAgent::IsAttached() { | 371 bool DevToolsAgent::IsAttached() { |
| 366 return is_attached_; | 372 return is_attached_; |
| 367 } | 373 } |
| 368 | 374 |
| 369 } // namespace content | 375 } // namespace content |
| OLD | NEW |