| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 }; | 396 }; |
| 397 | 397 |
| 398 /** | 398 /** |
| 399 * @constructor | 399 * @constructor |
| 400 * @extends {TreeOutlineInShadow} | 400 * @extends {TreeOutlineInShadow} |
| 401 * @param {!WebInspector.SecurityPanelSidebarTreeElement} mainViewElement | 401 * @param {!WebInspector.SecurityPanelSidebarTreeElement} mainViewElement |
| 402 * @param {function(!WebInspector.SecurityPanel.Origin)} showOriginInPanel | 402 * @param {function(!WebInspector.SecurityPanel.Origin)} showOriginInPanel |
| 403 */ | 403 */ |
| 404 WebInspector.SecurityPanelSidebarTree = function(mainViewElement, showOriginInPa
nel) | 404 WebInspector.SecurityPanelSidebarTree = function(mainViewElement, showOriginInPa
nel) |
| 405 { | 405 { |
| 406 this._showOriginInPanel = showOriginInPanel; | |
| 407 | |
| 408 this._mainOrigin = null; | |
| 409 | |
| 410 TreeOutlineInShadow.call(this); | 406 TreeOutlineInShadow.call(this); |
| 411 this.registerRequiredCSS("security/sidebar.css"); | 407 this.registerRequiredCSS("security/sidebar.css"); |
| 412 this.registerRequiredCSS("security/lockIcon.css"); | 408 this.registerRequiredCSS("security/lockIcon.css"); |
| 409 this.appendChild(mainViewElement); |
| 413 | 410 |
| 414 this.appendChild(mainViewElement); | 411 this._showOriginInPanel = showOriginInPanel; |
| 412 this._mainOrigin = null; |
| 415 | 413 |
| 416 /** @type {!Map<!WebInspector.SecurityPanelSidebarTree.OriginGroupName, !Tre
eElement>} */ | 414 /** @type {!Map<!WebInspector.SecurityPanelSidebarTree.OriginGroupName, !Tre
eElement>} */ |
| 417 this._originGroups = new Map(); | 415 this._originGroups = new Map(); |
| 418 | 416 |
| 419 for (var key in WebInspector.SecurityPanelSidebarTree.OriginGroupName) { | 417 for (var key in WebInspector.SecurityPanelSidebarTree.OriginGroupName) { |
| 420 var originGroupName = WebInspector.SecurityPanelSidebarTree.OriginGroupN
ame[key]; | 418 var originGroupName = WebInspector.SecurityPanelSidebarTree.OriginGroupN
ame[key]; |
| 421 var originGroup = new TreeElement(originGroupName, true); | 419 var originGroup = new TreeElement(originGroupName, true); |
| 422 originGroup.selectable = false; | 420 originGroup.selectable = false; |
| 423 originGroup.expand(); | 421 originGroup.expand(); |
| 424 originGroup.listItemElement.classList.add("security-sidebar-origins"); | 422 originGroup.listItemElement.classList.add("security-sidebar-origins"); |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 | 849 |
| 852 /** | 850 /** |
| 853 * @constructor | 851 * @constructor |
| 854 * @extends {WebInspector.VBox} | 852 * @extends {WebInspector.VBox} |
| 855 * @param {!WebInspector.SecurityPanel} panel | 853 * @param {!WebInspector.SecurityPanel} panel |
| 856 * @param {!WebInspector.SecurityPanel.Origin} origin | 854 * @param {!WebInspector.SecurityPanel.Origin} origin |
| 857 * @param {!WebInspector.SecurityPanel.OriginState} originState | 855 * @param {!WebInspector.SecurityPanel.OriginState} originState |
| 858 */ | 856 */ |
| 859 WebInspector.SecurityOriginView = function(panel, origin, originState) | 857 WebInspector.SecurityOriginView = function(panel, origin, originState) |
| 860 { | 858 { |
| 859 WebInspector.VBox.call(this); |
| 861 this._panel = panel; | 860 this._panel = panel; |
| 862 WebInspector.VBox.call(this); | |
| 863 this.setMinimumSize(200, 100); | 861 this.setMinimumSize(200, 100); |
| 864 | 862 |
| 865 this.element.classList.add("security-origin-view"); | 863 this.element.classList.add("security-origin-view"); |
| 866 this.registerRequiredCSS("security/originView.css"); | 864 this.registerRequiredCSS("security/originView.css"); |
| 867 this.registerRequiredCSS("security/lockIcon.css"); | 865 this.registerRequiredCSS("security/lockIcon.css"); |
| 868 | 866 |
| 869 var titleSection = this.element.createChild("div", "title-section"); | 867 var titleSection = this.element.createChild("div", "title-section"); |
| 870 var originDisplay = titleSection.createChild("div", "origin-display"); | 868 var originDisplay = titleSection.createChild("div", "origin-display"); |
| 871 this._originLockIcon = originDisplay.createChild("span", "security-property"
); | 869 this._originLockIcon = originDisplay.createChild("span", "security-property"
); |
| 872 this._originLockIcon.classList.add("security-property-" + originState.securi
tyState); | 870 this._originLockIcon.classList.add("security-property-" + originState.securi
tyState); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 row.createChild("div").textContent = key; | 1073 row.createChild("div").textContent = key; |
| 1076 | 1074 |
| 1077 var valueDiv = row.createChild("div"); | 1075 var valueDiv = row.createChild("div"); |
| 1078 if (typeof value === "string") { | 1076 if (typeof value === "string") { |
| 1079 valueDiv.textContent = value; | 1077 valueDiv.textContent = value; |
| 1080 } else { | 1078 } else { |
| 1081 valueDiv.appendChild(value); | 1079 valueDiv.appendChild(value); |
| 1082 } | 1080 } |
| 1083 } | 1081 } |
| 1084 }; | 1082 }; |
| OLD | NEW |