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

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

Issue 373743003: DevTools: Add support for adding source map to a script from the DevTools window. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined 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
« no previous file with comments | « Source/devtools/front_end/sdk/CompilerScriptMapping.js ('k') | Source/devtools/front_end/sdk/Script.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/ResourceScriptMapping.js
diff --git a/Source/devtools/front_end/sdk/ResourceScriptMapping.js b/Source/devtools/front_end/sdk/ResourceScriptMapping.js
index 089f63f3aa49d71921d0264dbbf6ab32c6323535..a9565d878e1509c8a71e4a41ca2f518aee1fb355 100644
--- a/Source/devtools/front_end/sdk/ResourceScriptMapping.js
+++ b/Source/devtools/front_end/sdk/ResourceScriptMapping.js
@@ -221,45 +221,7 @@ WebInspector.ResourceScriptMapping.prototype = {
}
/**
- * @interface
- * @extends {WebInspector.EventTarget}
- */
-WebInspector.ScriptFile = function()
-{
-}
-
-WebInspector.ScriptFile.Events = {
- DidMergeToVM: "DidMergeToVM",
- DidDivergeFromVM: "DidDivergeFromVM",
-}
-
-WebInspector.ScriptFile.prototype = {
- /**
- * @return {boolean}
- */
- hasDivergedFromVM: function() { return false; },
-
- /**
- * @return {boolean}
- */
- isDivergingFromVM: function() { return false; },
-
- /**
- * @return {boolean}
- */
- isMergingToVM: function() { return false; },
-
- checkMapping: function() { },
-
- /**
- * @return {?WebInspector.Target}
- */
- target: function() { return null; },
-}
-
-/**
* @constructor
- * @implements {WebInspector.ScriptFile}
* @extends {WebInspector.Object}
* @param {!WebInspector.ResourceScriptMapping} resourceScriptMapping
* @param {!WebInspector.UISourceCode} uiSourceCode
@@ -269,7 +231,6 @@ WebInspector.ResourceScriptFile = function(resourceScriptMapping, uiSourceCode,
{
console.assert(scripts.length);
- WebInspector.ScriptFile.call(this);
this._resourceScriptMapping = resourceScriptMapping;
this._uiSourceCode = uiSourceCode;
@@ -280,6 +241,11 @@ WebInspector.ResourceScriptFile = function(resourceScriptMapping, uiSourceCode,
this._update();
}
+WebInspector.ResourceScriptFile.Events = {
+ DidMergeToVM: "DidMergeToVM",
+ DidDivergeFromVM: "DidDivergeFromVM",
+}
+
WebInspector.ResourceScriptFile.prototype = {
/**
* @param {function(?string,!DebuggerAgent.SetScriptSourceError=,!WebInspector.Script=)=} callback
@@ -345,7 +311,7 @@ WebInspector.ResourceScriptFile.prototype = {
this._resourceScriptMapping._hasDivergedFromVM(this._uiSourceCode);
delete this._isDivergingFromVM;
this._hasDivergedFromVM = true;
- this.dispatchEventToListeners(WebInspector.ScriptFile.Events.DidDivergeFromVM, this._uiSourceCode);
+ this.dispatchEventToListeners(WebInspector.ResourceScriptFile.Events.DidDivergeFromVM, this._uiSourceCode);
},
_mergeToVM: function()
@@ -354,7 +320,7 @@ WebInspector.ResourceScriptFile.prototype = {
this._isMergingToVM = true;
this._resourceScriptMapping._hasMergedToVM(this._uiSourceCode);
delete this._isMergingToVM;
- this.dispatchEventToListeners(WebInspector.ScriptFile.Events.DidMergeToVM, this._uiSourceCode);
+ this.dispatchEventToListeners(WebInspector.ResourceScriptFile.Events.DidMergeToVM, this._uiSourceCode);
},
/**
@@ -415,5 +381,15 @@ WebInspector.ResourceScriptFile.prototype = {
this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
},
+ /**
+ * @param {string} sourceMapURL
+ */
+ addSourceMapURL: function(sourceMapURL)
+ {
+ if (!this._script)
+ return;
+ this._script.addSourceMapURL(sourceMapURL);
+ },
+
__proto__: WebInspector.Object.prototype
}
« no previous file with comments | « Source/devtools/front_end/sdk/CompilerScriptMapping.js ('k') | Source/devtools/front_end/sdk/Script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698