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

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

Issue 1327593003: DevTools: [security] open certificate viewer from devtools security overview (blink) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 5 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/security/mainView.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 */ 335 */
336 _addExplanation: function(explanation) 336 _addExplanation: function(explanation)
337 { 337 {
338 var explanationSection = this._securityExplanations.createChild("div", " security-section"); 338 var explanationSection = this._securityExplanations.createChild("div", " security-section");
339 explanationSection.classList.add("security-explanation"); 339 explanationSection.classList.add("security-explanation");
340 340
341 explanationSection.createChild("div", "lock-icon").classList.add("lock-i con-" + explanation.securityState); 341 explanationSection.createChild("div", "lock-icon").classList.add("lock-i con-" + explanation.securityState);
342 var text = explanationSection.createChild("div", "security-section-text" ); 342 var text = explanationSection.createChild("div", "security-section-text" );
343 text.createChild("div", "security-section-title").textContent = explanat ion.summary; 343 text.createChild("div", "security-section-title").textContent = explanat ion.summary;
344 text.createChild("div", "security-explanation").textContent = explanatio n.description; 344 text.createChild("div", "security-explanation").textContent = explanatio n.description;
345 if ("certificateId" in explanation) {
346 var certificateAnchor = text.createChild("div", "security-certificat e-id link");
347 certificateAnchor.textContent = WebInspector.UIString("View certific ate");
348 certificateAnchor.href = "";
349 certificateAnchor.addEventListener("click", showCertificateViewer, f alse);
350 }
351 /**
352 * @param {!Event} e
353 */
354 function showCertificateViewer(e)
355 {
356 e.consume();
357 WebInspector.targetManager.mainTarget().networkManager.showCertifica teViewer(/** @type {number} */ (explanation.certificateId));
358 }
345 }, 359 },
346 360
347 /** 361 /**
348 * @param {!SecurityAgent.SecurityState} newSecurityState 362 * @param {!SecurityAgent.SecurityState} newSecurityState
349 * @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations 363 * @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations
350 */ 364 */
351 updateSecurityState: function(newSecurityState, explanations) 365 updateSecurityState: function(newSecurityState, explanations)
352 { 366 {
353 // Remove old state. 367 // Remove old state.
354 // It's safe to call this even when this._securityState is undefined. 368 // It's safe to call this even when this._securityState is undefined.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 547
534 var valueDiv = row.createChild("div"); 548 var valueDiv = row.createChild("div");
535 if (value instanceof HTMLDivElement) { 549 if (value instanceof HTMLDivElement) {
536 valueDiv.appendChild(value); 550 valueDiv.appendChild(value);
537 } else { 551 } else {
538 valueDiv.textContent = value; 552 valueDiv.textContent = value;
539 } 553 }
540 } 554 }
541 } 555 }
542 556
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/security/mainView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698