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

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

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.AppManifestView = function() 10 WebInspector.AppManifestView = function()
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 /** 63 /**
64 * @override 64 * @override
65 * @param {!WebInspector.Target} target 65 * @param {!WebInspector.Target} target
66 */ 66 */
67 targetRemoved: function(target) 67 targetRemoved: function(target)
68 { 68 {
69 }, 69 },
70 70
71 _updateManifest: function() 71 _updateManifest: function()
72 { 72 {
73 this._target.resourceTreeModel.fetchAppManifest(this._renderManifest.bin d(this)); 73 var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(this._ target);
dgozman 2016/07/14 16:29:28 I'd rather set this._resourceTreeModel in targetAd
eostroukhov-old 2016/07/20 23:46:15 Done.
74 if (resourceTreeModel)
75 resourceTreeModel.fetchAppManifest(this._renderManifest.bind(this));
74 }, 76 },
75 77
76 /** 78 /**
77 * @param {string} url 79 * @param {string} url
78 * @param {?string} data 80 * @param {?string} data
79 * @param {!Array<!PageAgent.AppManifestError>} errors 81 * @param {!Array<!PageAgent.AppManifestError>} errors
80 */ 82 */
81 _renderManifest: function(url, data, errors) 83 _renderManifest: function(url, data, errors)
82 { 84 {
83 this._reportView.setURL(url); 85 this._reportView.setURL(url);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 { 135 {
134 var target = WebInspector.targetManager.mainTarget(); 136 var target = WebInspector.targetManager.mainTarget();
135 if (target && target.hasBrowserCapability()) { 137 if (target && target.hasBrowserCapability()) {
136 target.pageAgent().requestAppBanner(); 138 target.pageAgent().requestAppBanner();
137 WebInspector.console.show(); 139 WebInspector.console.show();
138 } 140 }
139 }, 141 },
140 142
141 __proto__: WebInspector.VBox.prototype 143 __proto__: WebInspector.VBox.prototype
142 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698