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

Side by Side Diff: content/renderer/devtools/devtools_agent.cc

Issue 510703002: DevTools: remove methods used for native memory instrumentation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « content/renderer/devtools/devtools_agent.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 const blink::WebDeviceEmulationParams& params) { 247 const blink::WebDeviceEmulationParams& params) {
248 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); 248 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view());
249 impl->EnableScreenMetricsEmulation(params); 249 impl->EnableScreenMetricsEmulation(params);
250 } 250 }
251 251
252 void DevToolsAgent::disableDeviceEmulation() { 252 void DevToolsAgent::disableDeviceEmulation() {
253 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); 253 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view());
254 impl->DisableScreenMetricsEmulation(); 254 impl->DisableScreenMetricsEmulation();
255 } 255 }
256 256
257 #if defined(USE_TCMALLOC) && !defined(OS_WIN)
258 static void AllocationVisitor(void* data, const void* ptr) {
259 typedef blink::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor;
260 Visitor* visitor = reinterpret_cast<Visitor*>(data);
261 visitor->visitObject(ptr);
262 }
263 #endif
264
265 void DevToolsAgent::visitAllocatedObjects(AllocatedObjectVisitor* visitor) {
266 #if defined(USE_TCMALLOC) && !defined(OS_WIN)
267 IterateAllocatedObjects(&AllocationVisitor, visitor);
268 #endif
269 }
270
271 // static 257 // static
272 DevToolsAgent* DevToolsAgent::FromRoutingId(int routing_id) { 258 DevToolsAgent* DevToolsAgent::FromRoutingId(int routing_id) {
273 IdToAgentMap::iterator it = g_agent_for_routing_id.Get().find(routing_id); 259 IdToAgentMap::iterator it = g_agent_for_routing_id.Get().find(routing_id);
274 if (it != g_agent_for_routing_id.Get().end()) { 260 if (it != g_agent_for_routing_id.Get().end()) {
275 return it->second; 261 return it->second;
276 } 262 }
277 return NULL; 263 return NULL;
278 } 264 }
279 265
280 void DevToolsAgent::OnAttach(const std::string& host_id) { 266 void DevToolsAgent::OnAttach(const std::string& host_id) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 if (!web_view) 354 if (!web_view)
369 return NULL; 355 return NULL;
370 return web_view->devToolsAgent(); 356 return web_view->devToolsAgent();
371 } 357 }
372 358
373 bool DevToolsAgent::IsAttached() { 359 bool DevToolsAgent::IsAttached() {
374 return is_attached_; 360 return is_attached_;
375 } 361 }
376 362
377 } // namespace content 363 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_agent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698