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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js

Issue 2172753002: [DevTools] No longer store security origins in ResourceTreeModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test failures Created 4 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: third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
index a458ab19f198bd24d4a974c94461682a68729bf3..dab72cf0385e0b8edc61897d223cbc2742c8ac40 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
@@ -42,7 +42,7 @@ WebInspector.AppManifestView = function()
this._orientationField = this._presentationSection.appendField(WebInspector.UIString("Orientation"));
this._displayField = this._presentationSection.appendField(WebInspector.UIString("Display"));
- WebInspector.targetManager.observeTargets(this);
+ WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capability.DOM);
}
WebInspector.AppManifestView.prototype = {
@@ -52,12 +52,12 @@ WebInspector.AppManifestView.prototype = {
*/
targetAdded: function(target)
{
- if (this._target)
+ if (this._resourceTreeModel)
return;
- this._target = target;
-
+ var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target);
+ this._resourceTreeModel = resourceTreeModel;
this._updateManifest();
- WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._updateManifest, this);
+ resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._updateManifest, this);
},
/**
@@ -70,7 +70,7 @@ WebInspector.AppManifestView.prototype = {
_updateManifest: function()
{
- this._target.resourceTreeModel.fetchAppManifest(this._renderManifest.bind(this));
+ this._resourceTreeModel.fetchAppManifest(this._renderManifest.bind(this));
},
/**

Powered by Google App Engine
This is Rietveld 408576698