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

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: 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
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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 */ 349 */
350 _addExplanation: function(explanation) 350 _addExplanation: function(explanation)
351 { 351 {
352 var explanationSection = this._securityExplanations.createChild("div", " security-section"); 352 var explanationSection = this._securityExplanations.createChild("div", " security-section");
353 explanationSection.classList.add("security-explanation"); 353 explanationSection.classList.add("security-explanation");
354 354
355 explanationSection.createChild("div", "lock-icon").classList.add("lock-i con-" + explanation.securityState); 355 explanationSection.createChild("div", "lock-icon").classList.add("lock-i con-" + explanation.securityState);
356 var text = explanationSection.createChild("div", "security-section-text" ); 356 var text = explanationSection.createChild("div", "security-section-text" );
357 text.createChild("div", "security-section-title").textContent = explanat ion.summary; 357 text.createChild("div", "security-section-title").textContent = explanat ion.summary;
358 text.createChild("div", "security-explanation").textContent = explanatio n.description; 358 text.createChild("div", "security-explanation").textContent = explanatio n.description;
359 if ("certificateId" in explanation) {
360 var certificateAnchor = text.createChild("div", "security-certificat e-id link");
dgozman 2015/09/02 19:02:41 div -> a?
pfeldman 2015/09/02 21:29:13 Needs to be block.
361 certificateAnchor.textContent = WebInspector.UIString("View certific ate");
362 certificateAnchor.href = "";
363 certificateAnchor.addEventListener("click", showCertificaite, false) ;
364 }
365 /**
366 * @param {!Event} e
367 */
368 function showCertificaite(e)
lgarron 2015/09/02 01:43:38 Nit: s/showCertificaite/showCertificate (I'd actu
pfeldman 2015/09/02 21:29:13 Done.
369 {
370 e.consume();
371 WebInspector.targetManager.mainTarget().networkManager.showCertifica teViewer(/** @type {number} */ (explanation.certificateId));
pfeldman 2015/09/02 01:34:14 We might want to pass the this._target from the se
lgarron 2015/09/02 01:43:38 I would personally add showCertificate() to WebIns
dgozman 2015/09/02 19:02:41 Should not matter actually.
372 }
359 }, 373 },
360 374
361 /** 375 /**
362 * @param {!SecurityAgent.SecurityState} newSecurityState 376 * @param {!SecurityAgent.SecurityState} newSecurityState
363 * @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations 377 * @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations
364 */ 378 */
365 updateSecurityState: function(newSecurityState, explanations) 379 updateSecurityState: function(newSecurityState, explanations)
366 { 380 {
367 // Remove old state. 381 // Remove old state.
368 // It's safe to call this even when this._securityState is undefined. 382 // It's safe to call this even when this._securityState is undefined.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 540
527 var valueDiv = row.createChild("div"); 541 var valueDiv = row.createChild("div");
528 if (value instanceof HTMLDivElement) { 542 if (value instanceof HTMLDivElement) {
529 valueDiv.appendChild(value); 543 valueDiv.appendChild(value);
530 } else { 544 } else {
531 valueDiv.textContent = value; 545 valueDiv.textContent = value;
532 } 546 }
533 } 547 }
534 } 548 }
535 549
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/security/mainView.css » ('j') | Source/devtools/front_end/security/mainView.css » ('J')

Powered by Google App Engine
This is Rietveld 408576698