Demo/bin/Debug/front_end/security/SecurityPanel.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @constructor
* @extends {WebInspector.PanelWithSidebar}
* @implements {WebInspector.TargetManager.Observer}
*/
WebInspector.SecurityPanel = function() {
WebInspector.PanelWithSidebar.call(this, "security");
this.registerRequiredCSS("security/securityPanel.css");
this.registerRequiredCSS("security/lockIcon.css");
var sidebarTree = new TreeOutlineInShadow();
sidebarTree.element.classList.add("sidebar-tree");
this.panelSidebarElement().appendChild(sidebarTree.element);
sidebarTree.registerRequiredCSS("security/lockIcon.css");
this.setDefaultFocusedElement(sidebarTree.element);
this._sidebarMainViewElement = new WebInspector.SecurityMainViewSidebarTreeElement(this);
sidebarTree.appendChild(this._sidebarMainViewElement);
this._mainView = new WebInspector.SecurityMainView();
this.showMainView();
WebInspector.targetManager.observeTargets(this);
}
WebInspector.SecurityPanel.prototype = {
/**
* @param {!SecurityAgent.SecurityState} newSecurityState
* @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations
*/
_updateSecurityState: function(newSecurityState, explanations)
{
this._sidebarMainViewElement.setSecurityState(newSecurityState);
this._mainView.updateSecurityState(newSecurityState, explanations);
},
/**
* @param {!WebInspector.Event} event
*/
_onSecurityStateChanged: function(event)
{
var securityState = /** @type {!SecurityAgent.SecurityState} */ (event.data.securityState);
var explanations = /** @type {!Array<!SecurityAgent.SecurityStateExplanation>} */ (event.data.explanations);
this._updateSecurityState(securityState, explanations);
},
showMainView: function()
{
this._setVisibleView(this._mainView);
},
/**
* @param {!WebInspector.VBox} view
*/
_setVisibleView: function(view)
后面还有 173 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。