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

Side by Side Diff: Source/WebCore/page/Console.cpp

Issue 13646003: DevTools: Remove ENABLE(INSPECTOR) and ENABLE(JAVASCRIPT_DEBUGGER) from the code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 void Console::count(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 178 void Console::count(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
179 { 179 {
180 InspectorInstrumentation::consoleCount(page(), state, arguments); 180 InspectorInstrumentation::consoleCount(page(), state, arguments);
181 } 181 }
182 182
183 void Console::markTimeline(PassRefPtr<ScriptArguments> arguments) 183 void Console::markTimeline(PassRefPtr<ScriptArguments> arguments)
184 { 184 {
185 InspectorInstrumentation::consoleTimeStamp(m_frame, arguments); 185 InspectorInstrumentation::consoleTimeStamp(m_frame, arguments);
186 } 186 }
187 187
188 #if ENABLE(JAVASCRIPT_DEBUGGER)
189 188
190 void Console::profile(const String& title, ScriptState* state) 189 void Console::profile(const String& title, ScriptState* state)
191 { 190 {
192 Page* page = this->page(); 191 Page* page = this->page();
193 if (!page) 192 if (!page)
194 return; 193 return;
195 194
196 // FIXME: log a console message when profiling is disabled. 195 // FIXME: log a console message when profiling is disabled.
197 if (!InspectorInstrumentation::profilerEnabled(page)) 196 if (!InspectorInstrumentation::profilerEnabled(page))
198 return; 197 return;
(...skipping 20 matching lines...) Expand all
219 218
220 RefPtr<ScriptProfile> profile = ScriptProfiler::stop(state, title); 219 RefPtr<ScriptProfile> profile = ScriptProfiler::stop(state, title);
221 if (!profile) 220 if (!profile)
222 return; 221 return;
223 222
224 m_profiles.append(profile); 223 m_profiles.append(profile);
225 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1)); 224 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1));
226 InspectorInstrumentation::addProfile(page, profile, callStack); 225 InspectorInstrumentation::addProfile(page, profile, callStack);
227 } 226 }
228 227
229 #endif
230 228
231 void Console::time(const String& title) 229 void Console::time(const String& title)
232 { 230 {
233 InspectorInstrumentation::startConsoleTiming(m_frame, title); 231 InspectorInstrumentation::startConsoleTiming(m_frame, title);
234 #if PLATFORM(CHROMIUM) 232 #if PLATFORM(CHROMIUM)
235 TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit", title.utf8().data(), this); 233 TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit", title.utf8().data(), this);
236 #endif 234 #endif
237 } 235 }
238 236
239 void Console::timeEnd(ScriptState* state, const String& title) 237 void Console::timeEnd(ScriptState* state, const String& title)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 271 }
274 272
275 Page* Console::page() const 273 Page* Console::page() const
276 { 274 {
277 if (!m_frame) 275 if (!m_frame)
278 return 0; 276 return 0;
279 return m_frame->page(); 277 return m_frame->page();
280 } 278 }
281 279
282 } // namespace WebCore 280 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698