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

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

Issue 1316853002: Organize security panel main view. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove experiment toggle. 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
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.SDKModel} 7 * @extends {WebInspector.SDKModel}
8 * @param {!WebInspector.Target} target 8 * @param {!WebInspector.Target} target
9 */ 9 */
10 WebInspector.SecurityModel = function(target) 10 WebInspector.SecurityModel = function(target)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 WebInspector.SecurityDispatcher = function(model) 53 WebInspector.SecurityDispatcher = function(model)
54 { 54 {
55 this._model = model; 55 this._model = model;
56 } 56 }
57 57
58 WebInspector.SecurityDispatcher.prototype = { 58 WebInspector.SecurityDispatcher.prototype = {
59 /** 59 /**
60 * @override 60 * @override
61 * @param {!SecurityAgent.SecurityState} securityState 61 * @param {!SecurityAgent.SecurityState} securityState
62 * @param {!Array<!SecurityAgent.SecurityStateExplanation>=} explanations 62 * @param {!Array<!SecurityAgent.SecurityStateExplanation>=} explanations
63 * @param {!SecurityAgent.MixedContentStatus=} mixedContentStatus
64 * @param {boolean=} schemeIsCryptographic
63 */ 65 */
64 securityStateChanged: function(securityState, explanations) 66 securityStateChanged: function(securityState, explanations, mixedContentStat us, schemeIsCryptographic)
65 { 67 {
66 var data = {"securityState": securityState, "explanations": explanations || []}; 68 var data = {"securityState": securityState, "explanations": explanations || []};
69 if (schemeIsCryptographic && mixedContentStatus) {
70 if (mixedContentStatus.ranInsecureContent) {
71 explanations.push({
72 "securityState": mixedContentStatus.ranInsecureContentStyle,
73 "summary": WebInspector.UIString("Active Mixed Content"),
74 "description": WebInspector.UIString("You have recently allo wed insecure content (such as scripts or iframes) to run on this site.")
75 });
76 } else if (mixedContentStatus.displayedInsecureContent) {
77 explanations.push({
78 "securityState": mixedContentStatus.displayedInsecureContent Style,
79 "summary": WebInspector.UIString("Mixed Content"),
80 "description": WebInspector.UIString("The site includes HTTP resources.")
81 });
82 }
83 }
67 this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTyp es.SecurityStateChanged, data); 84 this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTyp es.SecurityStateChanged, data);
68 } 85 }
69 } 86 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/Images/securityStateWarning_2x.png ('k') | Source/devtools/front_end/security/SecurityPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698