| OLD | NEW |
| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return aScore - bScore; | 68 return aScore - bScore; |
| 69 } | 69 } |
| 70 | 70 |
| 71 /** | 71 /** |
| 72 * @constructor | 72 * @constructor |
| 73 * @param {!SecurityAgent.SecurityState} securityState | 73 * @param {!SecurityAgent.SecurityState} securityState |
| 74 * @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations | 74 * @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations |
| 75 * @param {?SecurityAgent.MixedContentStatus} mixedContentStatus | 75 * @param {?SecurityAgent.MixedContentStatus} mixedContentStatus |
| 76 * @param {boolean} schemeIsCryptographic | 76 * @param {boolean} schemeIsCryptographic |
| 77 */ | 77 */ |
| 78 WebInspector.PageSecurityState = function (securityState, explanations, mixedCon
tentStatus, schemeIsCryptographic) { | 78 WebInspector.PageSecurityState = function(securityState, explanations, mixedCont
entStatus, schemeIsCryptographic) { |
| 79 this.securityState = securityState; | 79 this.securityState = securityState; |
| 80 this.explanations = explanations; | 80 this.explanations = explanations; |
| 81 this.mixedContentStatus = mixedContentStatus; | 81 this.mixedContentStatus = mixedContentStatus; |
| 82 this.schemeIsCryptographic = schemeIsCryptographic; | 82 this.schemeIsCryptographic = schemeIsCryptographic; |
| 83 } | 83 } |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * @constructor | 86 * @constructor |
| 87 * @implements {SecurityAgent.Dispatcher} | 87 * @implements {SecurityAgent.Dispatcher} |
| 88 */ | 88 */ |
| 89 WebInspector.SecurityDispatcher = function(model) | 89 WebInspector.SecurityDispatcher = function(model) |
| 90 { | 90 { |
| 91 this._model = model; | 91 this._model = model; |
| 92 } | 92 } |
| 93 | 93 |
| 94 WebInspector.SecurityDispatcher.prototype = { | 94 WebInspector.SecurityDispatcher.prototype = { |
| 95 /** | 95 /** |
| 96 * @override | 96 * @override |
| 97 * @param {!SecurityAgent.SecurityState} securityState | 97 * @param {!SecurityAgent.SecurityState} securityState |
| 98 * @param {!Array<!SecurityAgent.SecurityStateExplanation>=} explanations | 98 * @param {!Array<!SecurityAgent.SecurityStateExplanation>=} explanations |
| 99 * @param {!SecurityAgent.MixedContentStatus=} mixedContentStatus | 99 * @param {!SecurityAgent.MixedContentStatus=} mixedContentStatus |
| 100 * @param {boolean=} schemeIsCryptographic | 100 * @param {boolean=} schemeIsCryptographic |
| 101 */ | 101 */ |
| 102 securityStateChanged: function(securityState, explanations, mixedContentStat
us, schemeIsCryptographic) | 102 securityStateChanged: function(securityState, explanations, mixedContentStat
us, schemeIsCryptographic) |
| 103 { | 103 { |
| 104 var pageSecurityState = new WebInspector.PageSecurityState(securityState
, explanations || [], mixedContentStatus || null, schemeIsCryptographic || false
); | 104 var pageSecurityState = new WebInspector.PageSecurityState(securityState
, explanations || [], mixedContentStatus || null, schemeIsCryptographic || false
); |
| 105 this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTyp
es.SecurityStateChanged, pageSecurityState); | 105 this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTyp
es.SecurityStateChanged, pageSecurityState); |
| 106 } | 106 } |
| 107 } | 107 } |
| OLD | NEW |