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

Unified Diff: Source/devtools/front_end/sdk/DebuggerModel.js

Issue 310463003: DevTools: introduce TargetBreakpoints as a presentation of breakpoint and its state within target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address vsevik's comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/sdk/BreakpointManager.js ('k') | Source/devtools/front_end/sdk/Target.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/DebuggerModel.js
diff --git a/Source/devtools/front_end/sdk/DebuggerModel.js b/Source/devtools/front_end/sdk/DebuggerModel.js
index eb3c6fb42801249a54453207186efec3a9f7a88b..c5a77e9596cfdd45ce7db7754d52d78d34e61f48 100644
--- a/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -48,6 +48,8 @@ WebInspector.DebuggerModel = function(target)
this._scriptsBySourceURL = new StringMap();
this._breakpointsActive = true;
+ /** @type {!WebInspector.Object} */
+ this._breakpointResolvedEventTarget = new WebInspector.Object();
WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._pauseOnExceptionStateChanged, this);
WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOnExceptionStateChanged, this);
@@ -80,7 +82,6 @@ WebInspector.DebuggerModel.Events = {
DebuggerResumed: "DebuggerResumed",
ParsedScriptSource: "ParsedScriptSource",
FailedToParseScriptSource: "FailedToParseScriptSource",
- BreakpointResolved: "BreakpointResolved",
GlobalObjectCleared: "GlobalObjectCleared",
CallFrameSelected: "CallFrameSelected",
ConsoleCommandEvaluatedInSelectedCallFrame: "ConsoleCommandEvaluatedInSelectedCallFrame",
@@ -330,7 +331,7 @@ WebInspector.DebuggerModel.prototype = {
*/
_breakpointResolved: function(breakpointId, location)
{
- this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.BreakpointResolved, {breakpointId: breakpointId, location: WebInspector.DebuggerModel.Location.fromPayload(this.target(), location)});
+ this._breakpointResolvedEventTarget.dispatchEventToListeners(breakpointId, WebInspector.DebuggerModel.Location.fromPayload(this.target(), location));
},
_globalObjectCleared: function()
@@ -706,6 +707,26 @@ WebInspector.DebuggerModel.prototype = {
}
},
+ /**
+ * @param {!DebuggerAgent.BreakpointId} breakpointId
+ * @param {function(!WebInspector.Event)} listener
+ * @param {!Object=} thisObject
+ */
+ addBreakpointListener: function(breakpointId, listener, thisObject)
+ {
+ this._breakpointResolvedEventTarget.addEventListener(breakpointId, listener, thisObject)
+ },
+
+ /**
+ * @param {!DebuggerAgent.BreakpointId} breakpointId
+ * @param {function(!WebInspector.Event)} listener
+ * @param {!Object=} thisObject
+ */
+ removeBreakpointListener: function(breakpointId, listener, thisObject)
+ {
+ this._breakpointResolvedEventTarget.removeEventListener(breakpointId, listener, thisObject);
+ },
+
__proto__: WebInspector.TargetAwareObject.prototype
}
« no previous file with comments | « Source/devtools/front_end/sdk/BreakpointManager.js ('k') | Source/devtools/front_end/sdk/Target.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698