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

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

Issue 1727133002: Expose TLS settings in the Security panel overview, and call out individual obsolete settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Always expose TLS settings. Created 4 years, 8 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
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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 WebInspector.VBox.call(this, true); 540 WebInspector.VBox.call(this, true);
541 this.registerRequiredCSS("security/mainView.css"); 541 this.registerRequiredCSS("security/mainView.css");
542 this.registerRequiredCSS("security/lockIcon.css"); 542 this.registerRequiredCSS("security/lockIcon.css");
543 this.setMinimumSize(200, 100); 543 this.setMinimumSize(200, 100);
544 544
545 this.contentElement.classList.add("security-main-view"); 545 this.contentElement.classList.add("security-main-view");
546 546
547 this._panel = panel; 547 this._panel = panel;
548 548
549 this._summarySection = this.contentElement.createChild("div", "security-summ ary"); 549 this._summarySection = this.contentElement.createChild("div", "security-summ ary");
550 this._securityExplanations = this.contentElement.createChild("div", "securit y-explanation-list"); 550
551 // Info explanations should appear after all others.
552 this._securityExplanationsMain = this.contentElement.createChild("div", "sec urity-explanation-list");
553 this._securityExplanationsInfo = this.contentElement.createChild("div", "sec urity-explanation-list");
551 554
552 // Fill the security summary section. 555 // Fill the security summary section.
553 this._summarySection.createChild("div", "security-summary-section-title").te xtContent = WebInspector.UIString("Security Overview"); 556 this._summarySection.createChild("div", "security-summary-section-title").te xtContent = WebInspector.UIString("Security Overview");
554 557
555 var lockSpectrum = this._summarySection.createChild("div", "lock-spectrum"); 558 var lockSpectrum = this._summarySection.createChild("div", "lock-spectrum");
556 lockSpectrum.createChild("div", "lock-icon lock-icon-secure").title = WebIns pector.UIString("Secure"); 559 lockSpectrum.createChild("div", "lock-icon lock-icon-secure").title = WebIns pector.UIString("Secure");
557 lockSpectrum.createChild("div", "security-summary-lock-spacer"); 560 lockSpectrum.createChild("div", "security-summary-lock-spacer");
558 lockSpectrum.createChild("div", "lock-icon lock-icon-neutral").title = WebIn spector.UIString("Not Secure"); 561 lockSpectrum.createChild("div", "lock-icon lock-icon-neutral").title = WebIn spector.UIString("Not Secure");
559 lockSpectrum.createChild("div", "security-summary-lock-spacer"); 562 lockSpectrum.createChild("div", "security-summary-lock-spacer");
560 lockSpectrum.createChild("div", "lock-icon lock-icon-insecure").title = WebI nspector.UIString("Insecure (Broken)"); 563 lockSpectrum.createChild("div", "lock-icon lock-icon-insecure").title = WebI nspector.UIString("Insecure (Broken)");
561 564
562 this._summarySection.createChild("div", "triangle-pointer-container").create Child("div", "triangle-pointer-wrapper").createChild("div", "triangle-pointer"); 565 this._summarySection.createChild("div", "triangle-pointer-container").create Child("div", "triangle-pointer-wrapper").createChild("div", "triangle-pointer");
563 566
564 this._summaryText = this._summarySection.createChild("div", "security-summar y-text"); 567 this._summaryText = this._summarySection.createChild("div", "security-summar y-text");
565 } 568 }
566 569
567 WebInspector.SecurityMainView.prototype = { 570 WebInspector.SecurityMainView.prototype = {
568 /** 571 /**
569 * @param {!SecurityAgent.SecurityStateExplanation} explanation 572 * @param {!SecurityAgent.SecurityStateExplanation} explanation
570 * @return {!Element} 573 * @return {!Element}
571 */ 574 */
572 _addExplanation: function(explanation) 575 _addExplanation: function(explanation)
573 { 576 {
574 var explanationSection = this._securityExplanations.createChild("div", " security-explanation"); 577 var parent = (explanation.securityState == SecurityAgent.SecurityState.I nfo) ? this._securityExplanationsInfo : this._securityExplanationsMain;
578
579 var explanationSection = parent.createChild("div", "security-explanation ");
575 explanationSection.classList.add("security-explanation-" + explanation.s ecurityState); 580 explanationSection.classList.add("security-explanation-" + explanation.s ecurityState);
576 581
577 explanationSection.createChild("div", "security-property").classList.add ("security-property-" + explanation.securityState); 582 explanationSection.createChild("div", "security-property").classList.add ("security-property-" + explanation.securityState);
578 var text = explanationSection.createChild("div", "security-explanation-t ext"); 583 var text = explanationSection.createChild("div", "security-explanation-t ext");
579 text.createChild("div", "security-explanation-title").textContent = expl anation.summary; 584 text.createChild("div", "security-explanation-title").textContent = expl anation.summary;
580 text.createChild("div").textContent = explanation.description; 585 text.createChild("div").textContent = explanation.description;
581 586
582 if (explanation.certificateId) { 587 if (explanation.certificateId) {
583 text.appendChild(WebInspector.SecurityPanel.createCertificateViewerB utton(WebInspector.UIString("View certificate"), explanation.certificateId)); 588 text.appendChild(WebInspector.SecurityPanel.createCertificateViewerB utton(WebInspector.UIString("View certificate"), explanation.certificateId));
584 } 589 }
(...skipping 29 matching lines...) Expand all
614 this._schemeIsCryptographic = schemeIsCryptographic; 619 this._schemeIsCryptographic = schemeIsCryptographic;
615 620
616 this._panel.setRanInsecureContentStyle(mixedContentStatus.ranInsecureCon tentStyle); 621 this._panel.setRanInsecureContentStyle(mixedContentStatus.ranInsecureCon tentStyle);
617 this._panel.setDisplayedInsecureContentStyle(mixedContentStatus.displaye dInsecureContentStyle); 622 this._panel.setDisplayedInsecureContentStyle(mixedContentStatus.displaye dInsecureContentStyle);
618 623
619 this.refreshExplanations(); 624 this.refreshExplanations();
620 }, 625 },
621 626
622 refreshExplanations: function () 627 refreshExplanations: function ()
623 { 628 {
624 this._securityExplanations.removeChildren(); 629 this._securityExplanationsMain.removeChildren();
630 this._securityExplanationsInfo.removeChildren();
625 for (var explanation of this._explanations) 631 for (var explanation of this._explanations)
626 this._addExplanation(explanation); 632 this._addExplanation(explanation);
627 633
628 this._addMixedContentExplanations(); 634 this._addMixedContentExplanations();
629 }, 635 },
630 636
631 _addMixedContentExplanations: function () 637 _addMixedContentExplanations: function ()
632 { 638 {
633 if (!this._schemeIsCryptographic) 639 if (!this._schemeIsCryptographic)
634 return; 640 return;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 row.createChild("div").textContent = key; 937 row.createChild("div").textContent = key;
932 938
933 var valueDiv = row.createChild("div"); 939 var valueDiv = row.createChild("div");
934 if (typeof value === "string") { 940 if (typeof value === "string") {
935 valueDiv.textContent = value; 941 valueDiv.textContent = value;
936 } else { 942 } else {
937 valueDiv.appendChild(value); 943 valueDiv.appendChild(value);
938 } 944 }
939 } 945 }
940 } 946 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698