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

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

Issue 16143005: monitor console command implemented. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed custom bindings. 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 f6cc3a4d36d4db38d5ee4660a5e453f1f8633e2b..b836a79c96a49f6ad12d95f35539a245287797fe 100644
--- a/Source/core/inspector/InjectedScriptHost.cpp
+++ b/Source/core/inspector/InjectedScriptHost.cpp
@@ -143,14 +143,24 @@ String InjectedScriptHost::storageIdImpl(Storage* storage)
return String();
}
-void InjectedScriptHost::setBreakpoint(const String& scriptId, int lineNumber, int columnNumber)
+static InspectorDebuggerAgent::BreakpointSource parseBreakpointSource(const String& source)
+{
+ if (source == "debug")
+ return InspectorDebuggerAgent::DebugCommandBreakpointSource;
+ if (source == "monitor")
+ return InspectorDebuggerAgent::MonitorCommandBreakpointSource;
+ ASSERT(false);
+ return InspectorDebuggerAgent::UserBreakpointSource;
+}
+
+void InjectedScriptHost::setBreakpoint(const String& scriptId, int lineNumber, int columnNumber, const String& source, const String& condition)
{
- m_debuggerAgent->setBreakpoint(scriptId, lineNumber, columnNumber, InspectorDebuggerAgent::DebugCommandBreakpointSource);
+ m_debuggerAgent->setBreakpoint(scriptId, lineNumber, columnNumber, parseBreakpointSource(source), condition);
}
-void InjectedScriptHost::removeBreakpoint(const String& scriptId, int lineNumber, int columnNumber)
+void InjectedScriptHost::removeBreakpoint(const String& scriptId, int lineNumber, int columnNumber, const String& source)
{
- m_debuggerAgent->removeBreakpoint(scriptId, lineNumber, columnNumber, InspectorDebuggerAgent::DebugCommandBreakpointSource);
+ m_debuggerAgent->removeBreakpoint(scriptId, lineNumber, columnNumber, parseBreakpointSource(source));
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698