| 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 /** | 5 /** |
| 6 * @implements {SDK.SDKModelObserver<!SDK.ServiceWorkerManager>} | 6 * @implements {SDK.SDKModelObserver<!SDK.ServiceWorkerManager>} |
| 7 * @unrestricted | 7 * @unrestricted |
| 8 */ | 8 */ |
| 9 Audits2.Audits2Panel = class extends UI.PanelWithSidebar { | 9 Audits2.Audits2Panel = class extends UI.PanelWithSidebar { |
| 10 constructor() { | 10 constructor() { |
| 11 super('audits2'); | 11 super('audits2'); |
| 12 this.setHideOnDetach(); | |
| 13 this.registerRequiredCSS('audits2/audits2Panel.css'); | 12 this.registerRequiredCSS('audits2/audits2Panel.css'); |
| 14 this.registerRequiredCSS('audits2/lighthouse/report-styles.css'); | 13 this.registerRequiredCSS('audits2/lighthouse/report-styles.css'); |
| 15 | 14 |
| 16 this._protocolService = new Audits2.ProtocolService(); | 15 this._protocolService = new Audits2.ProtocolService(); |
| 17 this._protocolService.registerStatusCallback(msg => this._updateStatus(Commo
n.UIString(msg))); | 16 this._protocolService.registerStatusCallback(msg => this._updateStatus(Commo
n.UIString(msg))); |
| 18 | 17 |
| 19 var toolbar = new UI.Toolbar('', this.panelSidebarElement()); | 18 var toolbar = new UI.Toolbar('', this.panelSidebarElement()); |
| 20 | 19 |
| 21 var newButton = new UI.ToolbarButton(Common.UIString('New audit\u2026'), 'la
rgeicon-add'); | 20 var newButton = new UI.ToolbarButton(Common.UIString('New audit\u2026'), 'la
rgeicon-add'); |
| 22 toolbar.appendToolbarItem(newButton); | 21 toolbar.appendToolbarItem(newButton); |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 return; | 759 return; |
| 761 | 760 |
| 762 var element = Components.DOMPresentationUtils.linkifyNodeReference(node,
undefined, detailsItem.snippet); | 761 var element = Components.DOMPresentationUtils.linkifyNodeReference(node,
undefined, detailsItem.snippet); |
| 763 origElement.title = ''; | 762 origElement.title = ''; |
| 764 origElement.textContent = ''; | 763 origElement.textContent = ''; |
| 765 origElement.appendChild(element); | 764 origElement.appendChild(element); |
| 766 }); | 765 }); |
| 767 }); | 766 }); |
| 768 } | 767 } |
| 769 }; | 768 }; |
| OLD | NEW |