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