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

Side by Side Diff: Source/devtools/front_end/sdk/DefaultScriptMapping.js

Issue 464963002: DevTools: Make UISourceCode Target-agnostic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 addScript: function(script) 80 addScript: function(script)
81 { 81 {
82 var path = this._projectDelegate.addScript(script); 82 var path = this._projectDelegate.addScript(script);
83 var uiSourceCode = this._workspace.uiSourceCode(this._projectId, path); 83 var uiSourceCode = this._workspace.uiSourceCode(this._projectId, path);
84 if (!uiSourceCode) { 84 if (!uiSourceCode) {
85 console.assert(uiSourceCode); 85 console.assert(uiSourceCode);
86 return; 86 return;
87 } 87 }
88 this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode; 88 this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode;
89 this._scriptIdForUISourceCode.put(uiSourceCode, script.scriptId); 89 this._scriptIdForUISourceCode.put(uiSourceCode, script.scriptId);
90 uiSourceCode.setSourceMappingForTarget(this._debuggerModel.target(), thi s); 90 this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel.targ et(), uiSourceCode, this);
91 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); 91 this._debuggerWorkspaceBinding.pushSourceMapping(script, this);
92 script.addEventListener(WebInspector.Script.Events.ScriptEdited, this._s criptEdited.bind(this, script.scriptId)); 92 script.addEventListener(WebInspector.Script.Events.ScriptEdited, this._s criptEdited.bind(this, script.scriptId));
93 }, 93 },
94 94
95 /** 95 /**
96 * @return {boolean} 96 * @return {boolean}
97 */ 97 */
98 isIdentity: function() 98 isIdentity: function()
99 { 99 {
100 return true; 100 return true;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 { 172 {
173 var contentProvider = script.isInlineScript() ? new WebInspector.Concate natedScriptsContentProvider([script]) : script; 173 var contentProvider = script.isInlineScript() ? new WebInspector.Concate natedScriptsContentProvider([script]) : script;
174 var splitURL = WebInspector.ParsedURL.splitURL(script.sourceURL); 174 var splitURL = WebInspector.ParsedURL.splitURL(script.sourceURL);
175 var name = splitURL[splitURL.length - 1]; 175 var name = splitURL[splitURL.length - 1];
176 name = "VM" + script.scriptId + (name ? " " + name : ""); 176 name = "VM" + script.scriptId + (name ? " " + name : "");
177 return this.addContentProvider("", name, script.sourceURL, contentProvid er); 177 return this.addContentProvider("", name, script.sourceURL, contentProvid er);
178 }, 178 },
179 179
180 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype 180 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype
181 } 181 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/DebuggerWorkspaceBinding.js ('k') | Source/devtools/front_end/sdk/LiveEditSupport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698