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

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

Issue 1179353002: Surface lock icon explanations in the DevTools Security panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address nits. Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/devtools/front_end/security/SecurityPanel.js » ('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.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)
11 { 11 {
12 WebInspector.SDKModel.call(this, WebInspector.SecurityModel, target); 12 WebInspector.SDKModel.call(this, WebInspector.SecurityModel, target);
13 this._dispatcher = new WebInspector.SecurityDispatcher(this); 13 this._dispatcher = new WebInspector.SecurityDispatcher(this);
14 this._securityAgent = target.securityAgent(); 14 this._securityAgent = target.securityAgent();
15 target.registerSecurityDispatcher(this._dispatcher); 15 target.registerSecurityDispatcher(this._dispatcher);
16 this._securityAgent.enable(); 16 this._securityAgent.enable();
17 17
18 this._securityState = "unknown"; 18 this._securityState = SecurityAgent.SecurityState.Unknown;
19 } 19 }
20 20
21 WebInspector.SecurityModel.EventTypes = { 21 WebInspector.SecurityModel.EventTypes = {
22 SecurityStateChanged: "SecurityStateChanged" 22 SecurityStateChanged: "SecurityStateChanged"
23 } 23 }
24 24
25 WebInspector.SecurityModel.prototype = { 25 WebInspector.SecurityModel.prototype = {
26 /** 26 /**
27 * @return {!SecurityAgent.SecurityState} securityState 27 * @return {!SecurityAgent.SecurityState} securityState
28 */ 28 */
(...skipping 23 matching lines...) Expand all
52 */ 52 */
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 */ 63 */
63 securityStateChanged: function(securityState) 64 securityStateChanged: function(securityState, explanations)
64 { 65 {
65 this._model._securityState = securityState; 66 var data = {"securityState": securityState, "explanations": explanations || []};
66 this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTyp es.SecurityStateChanged, securityState); 67 this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTyp es.SecurityStateChanged, data);
67 } 68 }
68 } 69 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/security/SecurityPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698