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

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

Issue 299443016: DevTools: Decouple debugger model from UI entities (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge DebuggerScriptMapping into DebuggerWorkspaceBinding Created 6 years, 5 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/devtools/front_end/sdk/DefaultScriptMapping.js
diff --git a/Source/devtools/front_end/sdk/DefaultScriptMapping.js b/Source/devtools/front_end/sdk/DefaultScriptMapping.js
index 11cc83aeee48f7f815c3662213f202cd45fd5e63..5e88320fdab8e9d57ecbfdd5a85ab8559b6146c9 100644
--- a/Source/devtools/front_end/sdk/DefaultScriptMapping.js
+++ b/Source/devtools/front_end/sdk/DefaultScriptMapping.js
@@ -33,10 +33,12 @@
* @implements {WebInspector.ScriptSourceMapping}
* @param {!WebInspector.DebuggerModel} debuggerModel
* @param {!WebInspector.Workspace} workspace
+ * @param {!WebInspector.DebuggerWorkspaceBinding} debuggerWorkspaceBinding
*/
-WebInspector.DefaultScriptMapping = function(debuggerModel, workspace)
+WebInspector.DefaultScriptMapping = function(debuggerModel, workspace, debuggerWorkspaceBinding)
{
this._debuggerModel = debuggerModel;
+ this._debuggerWorkspaceBinding = debuggerWorkspaceBinding;
this._workspace = workspace;
this._projectId = WebInspector.DefaultScriptMapping.projectIdForTarget(debuggerModel.target());
this._projectDelegate = new WebInspector.DebuggerProjectDelegate(this._workspace, this._projectId, WebInspector.projectTypes.Debugger);
@@ -86,7 +88,7 @@ WebInspector.DefaultScriptMapping.prototype = {
this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode;
this._scriptIdForUISourceCode.put(uiSourceCode, script.scriptId);
uiSourceCode.setSourceMappingForTarget(this._debuggerModel.target(), this);
- script.pushSourceMapping(this);
+ this._debuggerWorkspaceBinding.pushSourceMapping(script, this);
script.addEventListener(WebInspector.Script.Events.ScriptEdited, this._scriptEdited.bind(this, script.scriptId));
},

Powered by Google App Engine
This is Rietveld 408576698