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

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: Extracted security origins from the ResourceTreeModel 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..012b5a81962c5fa4079e8622cad879bc5a6a7c82 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
@@ -52,12 +52,14 @@ WebInspector.AppManifestView.prototype = {
*/
targetAdded: function(target)
{
- if (this._target)
+ if (this._resourceTreeModel)
return;
- this._target = target;
-
- this._updateManifest();
- WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.MainFrameNavigated, this._updateManifest, this);
+ var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target);
+ if (resourceTreeModel) {
dgozman 2016/07/22 03:27:02 Let's observe DOM capability and assert here inste
eostroukhov-old 2016/07/22 23:27:43 Done.
+ this._resourceTreeModel = resourceTreeModel;
+ this._updateManifest();
+ resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._updateManifest, this);
+ }
},
/**
@@ -70,7 +72,8 @@ WebInspector.AppManifestView.prototype = {
_updateManifest: function()
{
- this._target.resourceTreeModel.fetchAppManifest(this._renderManifest.bind(this));
+ if (this._resourceTreeModel)
dgozman 2016/07/22 03:27:02 Judging by previous code, this method is never cal
eostroukhov-old 2016/07/22 23:27:43 Done.
+ this._resourceTreeModel.fetchAppManifest(this._renderManifest.bind(this));
},
/**

Powered by Google App Engine
This is Rietveld 408576698