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

Unified Diff: Source/core/inspector/InjectedScriptHost.cpp

Issue 16143005: monitor console command implemented. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Replacing set[Debug/Monitor]Breakpoint() by setBreakpoint(..., source,...). Created 7 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698