| OLD | NEW |
| 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 * @implements {SDK.SDKModelObserver<!SDK.ResourceTreeModel>} | 5 * @implements {SDK.SDKModelObserver<!SDK.ResourceTreeModel>} |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 Resources.AppManifestView = class extends UI.VBox { | 8 Resources.AppManifestView = class extends UI.VBox { |
| 9 constructor() { | 9 constructor() { |
| 10 super(true); | 10 super(true); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 if (typeof value !== 'string') | 150 if (typeof value !== 'string') |
| 151 return ''; | 151 return ''; |
| 152 return value; | 152 return value; |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 | 155 |
| 156 /** | 156 /** |
| 157 * @param {!Common.Event} event | 157 * @param {!Common.Event} event |
| 158 */ | 158 */ |
| 159 _addToHomescreen(event) { | 159 _addToHomescreen(event) { |
| 160 var target = SDK.targetManager.mainTarget(); | 160 var resourceTreeModel = SDK.targetManager.models(SDK.ResourceTreeModel)[0]; |
| 161 if (target && target.hasBrowserCapability()) { | 161 if (resourceTreeModel) { |
| 162 target.pageAgent().requestAppBanner(); | 162 resourceTreeModel.requestAppBanner(); |
| 163 Common.console.show(); | 163 Common.console.show(); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 }; | 166 }; |
| OLD | NEW |