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

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

Issue 356033002: DevTools: Get rid of WebInspector.debuggerModel in NetworkUISourceCodeProvider (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
Index: Source/devtools/front_end/sdk/Resource.js
diff --git a/Source/devtools/front_end/sdk/Resource.js b/Source/devtools/front_end/sdk/Resource.js
index 20c66ec49f3b814ea3cc5786dc2fadcceaddfeec..1dcfd8362a627acd10abf4df1cfc358ecf0690db 100644
--- a/Source/devtools/front_end/sdk/Resource.js
+++ b/Source/devtools/front_end/sdk/Resource.js
@@ -28,8 +28,9 @@
/**
* @constructor
- * @extends {WebInspector.Object}
+ * @extends {WebInspector.TargetAwareObject}
* @implements {WebInspector.ContentProvider}
+ * @param {!WebInspector.Target} target
* @param {?WebInspector.NetworkRequest} request
* @param {string} url
* @param {string} documentURL
@@ -39,8 +40,9 @@
* @param {string} mimeType
* @param {boolean=} isHidden
*/
-WebInspector.Resource = function(request, url, documentURL, frameId, loaderId, type, mimeType, isHidden)
+WebInspector.Resource = function(target, request, url, documentURL, frameId, loaderId, type, mimeType, isHidden)
{
+ WebInspector.TargetAwareObject.call(this, target);
this._request = request;
this.url = url;
this._documentURL = documentURL;
@@ -272,7 +274,7 @@ WebInspector.Resource.prototype = {
}
if (this.frameId)
- PageAgent.searchInResource(this.frameId, this.url, query, caseSensitive, isRegex, callbackWrapper);
+ this.target().pageAgent().searchInResource(this.frameId, this.url, query, caseSensitive, isRegex, callbackWrapper);
else
callback([]);
},
@@ -367,7 +369,7 @@ WebInspector.Resource.prototype = {
contentLoaded.call(this, null, content, this.request.contentEncoded);
}
- PageAgent.getResourceContent(this.frameId, this.url, resourceContentLoaded.bind(this));
+ this.target().pageAgent().getResourceContent(this.frameId, this.url, resourceContentLoaded.bind(this));
},
/**
@@ -378,6 +380,6 @@ WebInspector.Resource.prototype = {
return !!this._isHidden;
},
- __proto__: WebInspector.Object.prototype
+ __proto__: WebInspector.TargetAwareObject.prototype
}
« no previous file with comments | « Source/devtools/front_end/sdk/NetworkUISourceCodeProvider.js ('k') | Source/devtools/front_end/sdk/ResourceTreeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698