Index: Source/core/inspector/InjectedScriptHost.cpp |
diff --git a/Source/core/inspector/InjectedScriptHost.cpp b/Source/core/inspector/InjectedScriptHost.cpp |
index e1e8cc1f5fb4c8af3517711e559fc8f587410c25..ad59b48256b0aedfd2f896c5e628c9c49ee6e79f 100644 |
--- a/Source/core/inspector/InjectedScriptHost.cpp |
+++ b/Source/core/inspector/InjectedScriptHost.cpp |
@@ -146,14 +146,24 @@ ScriptDebugServer& InjectedScriptHost::scriptDebugServer() |
return m_debuggerAgent->scriptDebugServer(); |
} |
-void InjectedScriptHost::setBreakpoint(const String& scriptId, int lineNumber, int columnNumber) |
+static InspectorDebuggerAgent::BreakpointSource parseBreakpointSource(const String& source) |
{ |
- m_debuggerAgent->setBreakpoint(scriptId, lineNumber, columnNumber, InspectorDebuggerAgent::DebugCommandBreakpointSource); |
+ if (source == "debug") |
+ return InspectorDebuggerAgent::DebugCommandBreakpointSource; |
+ if (source == "monitor") |
+ return InspectorDebuggerAgent::MonitorCommandBreakpointSource; |
+ ASSERT(false); |
+ return InspectorDebuggerAgent::UserBreakpointSource; |
} |
-void InjectedScriptHost::removeBreakpoint(const String& scriptId, int lineNumber, int columnNumber) |
+void InjectedScriptHost::setBreakpoint(const String& scriptId, int lineNumber, int columnNumber, const String& source, const String& condition) |
{ |
- m_debuggerAgent->removeBreakpoint(scriptId, lineNumber, columnNumber, InspectorDebuggerAgent::DebugCommandBreakpointSource); |
+ m_debuggerAgent->setBreakpoint(scriptId, lineNumber, columnNumber, parseBreakpointSource(source), condition); |
+} |
+ |
+void InjectedScriptHost::removeBreakpoint(const String& scriptId, int lineNumber, int columnNumber, const String& source) |
+{ |
+ m_debuggerAgent->removeBreakpoint(scriptId, lineNumber, columnNumber, parseBreakpointSource(source)); |
} |
} // namespace WebCore |