| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #include "config.h" | 30 #include "config.h" |
| 31 #include "core/inspector/InspectorDebuggerAgent.h" | 31 #include "core/inspector/InspectorDebuggerAgent.h" |
| 32 #include "core/inspector/JavaScriptCallFrame.h" | 32 #include "core/inspector/JavaScriptCallFrame.h" |
| 33 | 33 |
| 34 #include "InspectorFrontend.h" | 34 #include "InspectorFrontend.h" |
| 35 #include "bindings/v8/ScriptDebugServer.h" | 35 #include "bindings/v8/ScriptDebugServer.h" |
| 36 #include "bindings/v8/ScriptObject.h" | 36 #include "bindings/v8/ScriptObject.h" |
| 37 #include "core/inspector/ConsoleMessage.h" |
| 37 #include "core/inspector/ContentSearchUtils.h" | 38 #include "core/inspector/ContentSearchUtils.h" |
| 38 #include "core/inspector/InjectedScript.h" | 39 #include "core/inspector/InjectedScript.h" |
| 39 #include "core/inspector/InjectedScriptManager.h" | 40 #include "core/inspector/InjectedScriptManager.h" |
| 40 #include "core/inspector/InspectorPageAgent.h" | 41 #include "core/inspector/InspectorPageAgent.h" |
| 41 #include "core/inspector/InspectorState.h" | 42 #include "core/inspector/InspectorState.h" |
| 42 #include "core/inspector/InstrumentingAgents.h" | 43 #include "core/inspector/InstrumentingAgents.h" |
| 43 #include "core/inspector/ScriptArguments.h" | 44 #include "core/inspector/ScriptArguments.h" |
| 44 #include "core/inspector/ScriptCallStack.h" | 45 #include "core/inspector/ScriptCallStack.h" |
| 45 #include "core/loader/cache/CachedResource.h" | 46 #include "core/loader/cache/CachedResource.h" |
| 46 #include "core/platform/JSONValues.h" | 47 #include "core/platform/JSONValues.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageTy
pe type, MessageLevel, const String&, PassRefPtr<ScriptCallStack>, unsigned long
) | 214 void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageTy
pe type, MessageLevel, const String&, PassRefPtr<ScriptCallStack>, unsigned long
) |
| 214 { | 215 { |
| 215 addMessageToConsole(source, type); | 216 addMessageToConsole(source, type); |
| 216 } | 217 } |
| 217 | 218 |
| 218 void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageTy
pe type, MessageLevel, const String&, ScriptState*, PassRefPtr<ScriptArguments>,
unsigned long) | 219 void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageTy
pe type, MessageLevel, const String&, ScriptState*, PassRefPtr<ScriptArguments>,
unsigned long) |
| 219 { | 220 { |
| 220 addMessageToConsole(source, type); | 221 addMessageToConsole(source, type); |
| 221 } | 222 } |
| 222 | 223 |
| 224 void InspectorDebuggerAgent::addMessageToConsole(PassOwnPtr<ConsoleMessage> mess
age) |
| 225 { |
| 226 addMessageToConsole(message->source(), message->type()); |
| 227 } |
| 228 |
| 223 | 229 |
| 224 static PassRefPtr<JSONObject> buildObjectForBreakpointCookie(const String& url,
int lineNumber, int columnNumber, const String& condition, bool isRegex, bool is
Anti) | 230 static PassRefPtr<JSONObject> buildObjectForBreakpointCookie(const String& url,
int lineNumber, int columnNumber, const String& condition, bool isRegex, bool is
Anti) |
| 225 { | 231 { |
| 226 RefPtr<JSONObject> breakpointObject = JSONObject::create(); | 232 RefPtr<JSONObject> breakpointObject = JSONObject::create(); |
| 227 breakpointObject->setString(DebuggerAgentState::url, url); | 233 breakpointObject->setString(DebuggerAgentState::url, url); |
| 228 breakpointObject->setNumber(DebuggerAgentState::lineNumber, lineNumber); | 234 breakpointObject->setNumber(DebuggerAgentState::lineNumber, lineNumber); |
| 229 breakpointObject->setNumber(DebuggerAgentState::columnNumber, columnNumber); | 235 breakpointObject->setNumber(DebuggerAgentState::columnNumber, columnNumber); |
| 230 breakpointObject->setString(DebuggerAgentState::condition, condition); | 236 breakpointObject->setString(DebuggerAgentState::condition, condition); |
| 231 breakpointObject->setBoolean(DebuggerAgentState::isRegex, isRegex); | 237 breakpointObject->setBoolean(DebuggerAgentState::isRegex, isRegex); |
| 232 breakpointObject->setBoolean(DebuggerAgentState::isAnti, isAnti); | 238 breakpointObject->setBoolean(DebuggerAgentState::isAnti, isAnti); |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 void InspectorDebuggerAgent::reset() | 937 void InspectorDebuggerAgent::reset() |
| 932 { | 938 { |
| 933 m_scripts.clear(); | 939 m_scripts.clear(); |
| 934 m_breakpointIdToDebugServerBreakpointIds.clear(); | 940 m_breakpointIdToDebugServerBreakpointIds.clear(); |
| 935 if (m_frontend) | 941 if (m_frontend) |
| 936 m_frontend->globalObjectCleared(); | 942 m_frontend->globalObjectCleared(); |
| 937 } | 943 } |
| 938 | 944 |
| 939 } // namespace WebCore | 945 } // namespace WebCore |
| 940 | 946 |
| OLD | NEW |