| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.PanelWithSidebar} | 7 * @extends {WebInspector.PanelWithSidebar} |
| 8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
| 9 */ | 9 */ |
| 10 WebInspector.SecurityPanel = function() | 10 WebInspector.SecurityPanel = function() |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 }, | 260 }, |
| 261 | 261 |
| 262 /** | 262 /** |
| 263 * @override | 263 * @override |
| 264 * @param {!WebInspector.Target} target | 264 * @param {!WebInspector.Target} target |
| 265 */ | 265 */ |
| 266 targetRemoved: function(target) | 266 targetRemoved: function(target) |
| 267 { | 267 { |
| 268 }, | 268 }, |
| 269 | 269 |
| 270 _clearOrigins: function() | 270 /** |
| 271 * @param {!WebInspector.Event} event |
| 272 */ |
| 273 _onMainFrameNavigated: function(event) |
| 271 { | 274 { |
| 275 var frame = /** type {!PageAgent.Frame}*/ (event.data); |
| 276 var request = this._lastResponseReceivedForLoaderId.get(frame.loaderId); |
| 277 |
| 278 // Clear the origins list. |
| 272 this.selectAndSwitchToMainView(); | 279 this.selectAndSwitchToMainView(); |
| 273 this._sidebarTree.clearOrigins(); | 280 this._sidebarTree.clearOrigins(); |
| 274 this._origins.clear(); | 281 this._origins.clear(); |
| 275 this._lastResponseReceivedForLoaderId.clear(); | 282 this._lastResponseReceivedForLoaderId.clear(); |
| 276 this._filterRequestCounts.clear(); | 283 this._filterRequestCounts.clear(); |
| 277 }, | 284 // After clearing the filtered request counts, refresh the |
| 278 | 285 // explanations to reflect the new counts. |
| 279 /** | 286 this._mainView.refreshExplanations(); |
| 280 * @param {!WebInspector.Event} event | |
| 281 */ | |
| 282 _onMainFrameNavigated: function(event) { | |
| 283 | |
| 284 var frame = /** type {!PageAgent.Frame}*/ (event.data); | |
| 285 var request = this._lastResponseReceivedForLoaderId.get(frame.loaderId); | |
| 286 this._clearOrigins(); | |
| 287 | |
| 288 | 287 |
| 289 if (request) { | 288 if (request) { |
| 290 var origin = WebInspector.ParsedURL.extractOrigin(request.url); | 289 var origin = WebInspector.ParsedURL.extractOrigin(request.url); |
| 291 this._sidebarTree.setMainOrigin(origin); | 290 this._sidebarTree.setMainOrigin(origin); |
| 292 this._processRequest(request); | 291 this._processRequest(request); |
| 293 } | 292 } |
| 294 }, | 293 }, |
| 295 | 294 |
| 296 __proto__: WebInspector.PanelWithSidebar.prototype | 295 __proto__: WebInspector.PanelWithSidebar.prototype |
| 297 } | 296 } |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 row.createChild("div").textContent = key; | 960 row.createChild("div").textContent = key; |
| 962 | 961 |
| 963 var valueDiv = row.createChild("div"); | 962 var valueDiv = row.createChild("div"); |
| 964 if (typeof value === "string") { | 963 if (typeof value === "string") { |
| 965 valueDiv.textContent = value; | 964 valueDiv.textContent = value; |
| 966 } else { | 965 } else { |
| 967 valueDiv.appendChild(value); | 966 valueDiv.appendChild(value); |
| 968 } | 967 } |
| 969 } | 968 } |
| 970 } | 969 } |
| OLD | NEW |