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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 | 117 |
118 /** | 118 /** |
119 * @param {!WebInspector.Event} event | 119 * @param {!WebInspector.Event} event |
120 */ | 120 */ |
121 _onResponseReceivedSecurityDetails: function(event) | 121 _onResponseReceivedSecurityDetails: function(event) |
122 { | 122 { |
123 var data = event.data; | 123 var data = event.data; |
124 var origin = /** @type {string} */ (data.origin); | 124 var origin = /** @type {string} */ (data.origin); |
125 var securityState = /** @type {!SecurityAgent.SecurityState} */ (data.se curityState); | 125 var securityState = /** @type {!SecurityAgent.SecurityState} */ (data.se curityState); |
126 | 126 |
127 if (origin === "") { | |
dgozman
2015/09/03 20:12:18
if (!origin)
| |
128 // We don't handle resources like data: URIs yet. Most of them don't affect the lock icon, anyhow. | |
129 return; | |
dgozman
2015/09/03 20:12:18
You should this on the model level, not on present
lgarron
2015/09/03 20:36:31
Hmm, that feels like it goes against the advice I
| |
130 } | |
131 | |
127 if (this._origins.has(origin)) { | 132 if (this._origins.has(origin)) { |
128 var originState = this._origins.get(origin); | 133 var originState = this._origins.get(origin); |
129 var oldSecurityState = originState.securityState; | 134 var oldSecurityState = originState.securityState; |
130 originState.securityState = this._securityStateMin(oldSecurityState, securityState); | 135 originState.securityState = this._securityStateMin(oldSecurityState, securityState); |
131 if (oldSecurityState != originState.securityState) { | 136 if (oldSecurityState != originState.securityState) { |
132 originState.sidebarElement.setSecurityState(securityState); | 137 originState.sidebarElement.setSecurityState(securityState); |
133 if (originState.originView) | 138 if (originState.originView) |
134 originState.originView.setSecurityState(securityState); | 139 originState.originView.setSecurityState(securityState); |
135 } | 140 } |
136 } else { | 141 } else { |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
512 | 517 |
513 var valueDiv = row.createChild("div"); | 518 var valueDiv = row.createChild("div"); |
514 if (value instanceof HTMLDivElement) { | 519 if (value instanceof HTMLDivElement) { |
515 valueDiv.appendChild(value); | 520 valueDiv.appendChild(value); |
516 } else { | 521 } else { |
517 valueDiv.textContent = value; | 522 valueDiv.textContent = value; |
518 } | 523 } |
519 } | 524 } |
520 } | 525 } |
521 | 526 |
OLD | NEW |