Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js

Issue 2574823002: DevTools: do not make main panel unconditionally focused by default. (Closed)
Patch Set: fixed the test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * @implements {SDK.TargetManager.Observer} 5 * @implements {SDK.TargetManager.Observer}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Security.SecurityPanel = class extends UI.PanelWithSidebar { 8 Security.SecurityPanel = class extends UI.PanelWithSidebar {
9 constructor() { 9 constructor() {
10 super('security'); 10 super('security');
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 var data = /** @type {!Security.PageSecurityState} */ (event.data); 108 var data = /** @type {!Security.PageSecurityState} */ (event.data);
109 var securityState = /** @type {!Protocol.Security.SecurityState} */ (data.se curityState); 109 var securityState = /** @type {!Protocol.Security.SecurityState} */ (data.se curityState);
110 var explanations = /** @type {!Array<!Protocol.Security.SecurityStateExplana tion>} */ (data.explanations); 110 var explanations = /** @type {!Array<!Protocol.Security.SecurityStateExplana tion>} */ (data.explanations);
111 var insecureContentStatus = /** @type {?Protocol.Security.InsecureContentSta tus} */ (data.insecureContentStatus); 111 var insecureContentStatus = /** @type {?Protocol.Security.InsecureContentSta tus} */ (data.insecureContentStatus);
112 var schemeIsCryptographic = /** @type {boolean} */ (data.schemeIsCryptograph ic); 112 var schemeIsCryptographic = /** @type {boolean} */ (data.schemeIsCryptograph ic);
113 this._updateSecurityState(securityState, explanations, insecureContentStatus , schemeIsCryptographic); 113 this._updateSecurityState(securityState, explanations, insecureContentStatus , schemeIsCryptographic);
114 } 114 }
115 115
116 selectAndSwitchToMainView() { 116 selectAndSwitchToMainView() {
117 // The sidebar element will trigger displaying the main view. Rather than ma king a redundant call to display the main view, we rely on this. 117 // The sidebar element will trigger displaying the main view. Rather than ma king a redundant call to display the main view, we rely on this.
118 this._sidebarMainViewElement.select(); 118 this._sidebarMainViewElement.select(true);
119 } 119 }
120 /** 120 /**
121 * @param {!Security.SecurityPanel.Origin} origin 121 * @param {!Security.SecurityPanel.Origin} origin
122 */ 122 */
123 showOrigin(origin) { 123 showOrigin(origin) {
124 var originState = this._origins.get(origin); 124 var originState = this._origins.get(origin);
125 if (!originState.originView) 125 if (!originState.originView)
126 originState.originView = new Security.SecurityOriginView(this, origin, ori ginState); 126 originState.originView = new Security.SecurityOriginView(this, origin, ori ginState);
127 127
128 this._setVisibleView(originState.originView); 128 this._setVisibleView(originState.originView);
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 var row = this._element.createChild('div', 'details-table-row'); 1036 var row = this._element.createChild('div', 'details-table-row');
1037 row.createChild('div').textContent = key; 1037 row.createChild('div').textContent = key;
1038 1038
1039 var valueDiv = row.createChild('div'); 1039 var valueDiv = row.createChild('div');
1040 if (typeof value === 'string') 1040 if (typeof value === 'string')
1041 valueDiv.textContent = value; 1041 valueDiv.textContent = value;
1042 else 1042 else
1043 valueDiv.appendChild(value); 1043 valueDiv.appendChild(value);
1044 } 1044 }
1045 }; 1045 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698