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

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

Issue 12150004: Category group support/Renamings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed comment, added better support for default filtering, fixed merge issues. Created 7 years, 9 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
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id())); 128 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id()));
129 } 129 }
130 130
131 void DevToolsAgent::clearBrowserCookies() { 131 void DevToolsAgent::clearBrowserCookies() {
132 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id())); 132 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id()));
133 } 133 }
134 134
135 void DevToolsAgent::setTraceEventCallback(TraceEventCallback cb) { 135 void DevToolsAgent::setTraceEventCallback(TraceEventCallback cb) {
136 TraceLog* trace_log = TraceLog::GetInstance(); 136 TraceLog* trace_log = TraceLog::GetInstance();
137 trace_log->SetEventCallback(cb); 137 trace_log->SetEventCallback(cb);
138 trace_log->SetEnabled(!!cb, TraceLog::RECORD_UNTIL_FULL); 138 if (!!cb)
139 trace_log->SetEnabled(base::debug::CategoryFilter(),
140 TraceLog::RECORD_UNTIL_FULL);
141 else
142 trace_log->SetDisabled();
139 } 143 }
140 144
141 #if defined(USE_TCMALLOC) && !defined(OS_WIN) 145 #if defined(USE_TCMALLOC) && !defined(OS_WIN)
142 static void AllocationVisitor(void* data, const void* ptr) { 146 static void AllocationVisitor(void* data, const void* ptr) {
143 typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor; 147 typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor;
144 Visitor* visitor = reinterpret_cast<Visitor*>(data); 148 Visitor* visitor = reinterpret_cast<Visitor*>(data);
145 visitor->visitObject(ptr); 149 visitor->visitObject(ptr);
146 } 150 }
147 #endif 151 #endif
148 152
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 if (!web_view) 249 if (!web_view)
246 return NULL; 250 return NULL;
247 return web_view->devToolsAgent(); 251 return web_view->devToolsAgent();
248 } 252 }
249 253
250 bool DevToolsAgent::IsAttached() { 254 bool DevToolsAgent::IsAttached() {
251 return is_attached_; 255 return is_attached_;
252 } 256 }
253 257
254 } // namespace content 258 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698