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

Side by Side Diff: Source/core/inspector/InspectorConsoleAgent.cpp

Issue 325143002: Oilpan: Prepare moving inspector script related classes to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 6 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 m_frontend = frontend->console(); 147 m_frontend = frontend->console();
148 } 148 }
149 149
150 void InspectorConsoleAgent::clearFrontend() 150 void InspectorConsoleAgent::clearFrontend()
151 { 151 {
152 m_frontend = 0; 152 m_frontend = 0;
153 String errorString; 153 String errorString;
154 disable(&errorString); 154 disable(&errorString);
155 } 155 }
156 156
157 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp e type, MessageLevel level, const String& message, ScriptCallStack* callStack, u nsigned long requestIdentifier) 157 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp e type, MessageLevel level, const String& message, PassRefPtrWillBeRawPtr<Script CallStack> callStack, unsigned long requestIdentifier)
158 { 158 {
159 if (type == ClearMessageType) { 159 if (type == ClearMessageType) {
160 ErrorString error; 160 ErrorString error;
161 clearMessages(&error); 161 clearMessages(&error);
162 } 162 }
163 163
164 addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type , level, message, callStack, requestIdentifier))); 164 addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type , level, message, callStack, requestIdentifier)));
165 } 165 }
166 166
167 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp e type, MessageLevel level, const String& message, ScriptState* scriptState, Scr iptArguments* arguments, unsigned long requestIdentifier) 167 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp e type, MessageLevel level, const String& message, ScriptState* scriptState, Pas sRefPtrWillBeRawPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
168 { 168 {
169 if (type == ClearMessageType) { 169 if (type == ClearMessageType) {
170 ErrorString error; 170 ErrorString error;
171 clearMessages(&error); 171 clearMessages(&error);
172 } 172 }
173 173
174 addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type , level, message, arguments, scriptState, requestIdentifier))); 174 addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type , level, message, arguments, scriptState, requestIdentifier)));
175 } 175 }
176 176
177 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp e type, MessageLevel level, const String& message, const String& scriptId, unsig ned lineNumber, unsigned columnNumber, ScriptState* scriptState, unsigned long r equestIdentifier) 177 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageTyp e type, MessageLevel level, const String& message, const String& scriptId, unsig ned lineNumber, unsigned columnNumber, ScriptState* scriptState, unsigned long r equestIdentifier)
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void InspectorConsoleAgent::consoleTimeline(ExecutionContext* context, const Str ing& title, ScriptState* scriptState) 225 void InspectorConsoleAgent::consoleTimeline(ExecutionContext* context, const Str ing& title, ScriptState* scriptState)
226 { 226 {
227 m_timelineAgent->consoleTimeline(context, title, scriptState); 227 m_timelineAgent->consoleTimeline(context, title, scriptState);
228 } 228 }
229 229
230 void InspectorConsoleAgent::consoleTimelineEnd(ExecutionContext* context, const String& title, ScriptState* scriptState) 230 void InspectorConsoleAgent::consoleTimelineEnd(ExecutionContext* context, const String& title, ScriptState* scriptState)
231 { 231 {
232 m_timelineAgent->consoleTimelineEnd(context, title, scriptState); 232 m_timelineAgent->consoleTimelineEnd(context, title, scriptState);
233 } 233 }
234 234
235 void InspectorConsoleAgent::consoleCount(ScriptState* scriptState, PassRefPtr<Sc riptArguments> arguments) 235 void InspectorConsoleAgent::consoleCount(ScriptState* scriptState, PassRefPtrWil lBeRawPtr<ScriptArguments> arguments)
236 { 236 {
237 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(scriptStat e)); 237 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol e(scriptState));
238 const ScriptCallFrame& lastCaller = callStack->at(0); 238 const ScriptCallFrame& lastCaller = callStack->at(0);
239 // Follow Firebug's behavior of counting with null and undefined title in 239 // Follow Firebug's behavior of counting with null and undefined title in
240 // the same bucket as no argument 240 // the same bucket as no argument
241 String title; 241 String title;
242 arguments->getFirstArgumentAsString(title); 242 arguments->getFirstArgumentAsString(title);
243 String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' + String::number(lastCaller.lineNumber())) 243 String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' + String::number(lastCaller.lineNumber()))
244 : String(title + '@'); 244 : String(title + '@');
245 245
246 HashCountedSet<String>::AddResult result = m_counts.add(identifier); 246 HashCountedSet<String>::AddResult result = m_counts.add(identifier);
247 String message = title + ": " + String::number(result.storedValue->value); 247 String message = title + ": " + String::number(result.storedValue->value);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 int m_heapObjectId; 325 int m_heapObjectId;
326 }; 326 };
327 327
328 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe apObjectId) 328 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe apObjectId)
329 { 329 {
330 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n ew InspectableHeapObject(inspectedHeapObjectId))); 330 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n ew InspectableHeapObject(inspectedHeapObjectId)));
331 } 331 }
332 332
333 } // namespace WebCore 333 } // namespace WebCore
334 334
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorConsoleAgent.h ('k') | Source/core/inspector/InspectorDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698