| 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 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
| 9 * @param {!WebInspector.ResourcesPanel} resourcesPanel | 9 * @param {!WebInspector.ResourcesPanel} resourcesPanel |
| 10 */ | 10 */ |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 { | 69 { |
| 70 if (this._target) | 70 if (this._target) |
| 71 return; | 71 return; |
| 72 this._target = target; | 72 this._target = target; |
| 73 var securityOriginManager = WebInspector.SecurityOriginManager.fromTarge
t(target); | 73 var securityOriginManager = WebInspector.SecurityOriginManager.fromTarge
t(target); |
| 74 this._updateOrigin(securityOriginManager.mainSecurityOrigin()); | 74 this._updateOrigin(securityOriginManager.mainSecurityOrigin()); |
| 75 securityOriginManager.addEventListener(WebInspector.SecurityOriginManage
r.Events.MainSecurityOriginChanged, this._originChanged, this); | 75 securityOriginManager.addEventListener(WebInspector.SecurityOriginManage
r.Events.MainSecurityOriginChanged, this._originChanged, this); |
| 76 }, | 76 }, |
| 77 | 77 |
| 78 /** | 78 /** |
| 79 * @override |
| 80 * @param {!WebInspector.Target} target |
| 81 */ |
| 82 targetRemoved: function(target) |
| 83 { |
| 84 if (this._target !== target) |
| 85 return; |
| 86 var securityOriginManager = WebInspector.SecurityOriginManager.fromTarge
t(target); |
| 87 securityOriginManager.removeEventListener(WebInspector.SecurityOriginMan
ager.Events.MainSecurityOriginChanged, this._originChanged, this); |
| 88 }, |
| 89 |
| 90 /** |
| 79 * @param {!WebInspector.Event} event | 91 * @param {!WebInspector.Event} event |
| 80 */ | 92 */ |
| 81 _originChanged: function(event) | 93 _originChanged: function(event) |
| 82 { | 94 { |
| 83 var origin = /** *@type {string} */ (event.data); | 95 var origin = /** *@type {string} */ (event.data); |
| 84 this._updateOrigin(origin); | 96 this._updateOrigin(origin); |
| 85 }, | 97 }, |
| 86 | 98 |
| 87 /** | 99 /** |
| 88 * @param {string} url | 100 * @param {string} url |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 156 } |
| 145 | 157 |
| 146 this._clearButton.disabled = true; | 158 this._clearButton.disabled = true; |
| 147 this._clearButton.textContent = WebInspector.UIString("Clearing..."); | 159 this._clearButton.textContent = WebInspector.UIString("Clearing..."); |
| 148 setTimeout(() => { | 160 setTimeout(() => { |
| 149 this._clearButton.disabled = false; | 161 this._clearButton.disabled = false; |
| 150 this._clearButton.textContent = WebInspector.UIString("Clear selecte
d"); | 162 this._clearButton.textContent = WebInspector.UIString("Clear selecte
d"); |
| 151 }, 500); | 163 }, 500); |
| 152 }, | 164 }, |
| 153 | 165 |
| 154 /** | |
| 155 * @override | |
| 156 * @param {!WebInspector.Target} target | |
| 157 */ | |
| 158 targetRemoved: function(target) | |
| 159 { | |
| 160 }, | |
| 161 | |
| 162 __proto__: WebInspector.VBox.prototype | 166 __proto__: WebInspector.VBox.prototype |
| 163 } | 167 } |
| OLD | NEW |