| 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) |
| 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 | |
| 18 this._securityState = SecurityAgent.SecurityState.Unknown; | |
| 19 } | 17 } |
| 20 | 18 |
| 21 WebInspector.SecurityModel.EventTypes = { | 19 WebInspector.SecurityModel.EventTypes = { |
| 22 SecurityStateChanged: "SecurityStateChanged" | 20 SecurityStateChanged: "SecurityStateChanged" |
| 23 } | 21 } |
| 24 | 22 |
| 25 WebInspector.SecurityModel.prototype = { | 23 WebInspector.SecurityModel.prototype = { |
| 26 /** | |
| 27 * @return {!SecurityAgent.SecurityState} securityState | |
| 28 */ | |
| 29 securityState: function() | |
| 30 { | |
| 31 return /** @type {!SecurityAgent.SecurityState} */ (this._securityState)
; | |
| 32 }, | |
| 33 | |
| 34 __proto__: WebInspector.SDKModel.prototype | 24 __proto__: WebInspector.SDKModel.prototype |
| 35 } | 25 } |
| 36 | 26 |
| 37 /** | 27 /** |
| 38 * @param {!WebInspector.Target} target | 28 * @param {!WebInspector.Target} target |
| 39 * @return {?WebInspector.SecurityModel} | 29 * @return {?WebInspector.SecurityModel} |
| 40 */ | 30 */ |
| 41 WebInspector.SecurityModel.fromTarget = function(target) | 31 WebInspector.SecurityModel.fromTarget = function(target) |
| 42 { | 32 { |
| 43 var model = /** @type {?WebInspector.SecurityModel} */ (target.model(WebInsp
ector.SecurityModel)); | 33 var model = /** @type {?WebInspector.SecurityModel} */ (target.model(WebInsp
ector.SecurityModel)); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 explanations.push({ | 67 explanations.push({ |
| 78 "securityState": mixedContentStatus.displayedInsecureContent
Style, | 68 "securityState": mixedContentStatus.displayedInsecureContent
Style, |
| 79 "summary": WebInspector.UIString("Mixed Content"), | 69 "summary": WebInspector.UIString("Mixed Content"), |
| 80 "description": WebInspector.UIString("The site includes HTTP
resources.") | 70 "description": WebInspector.UIString("The site includes HTTP
resources.") |
| 81 }); | 71 }); |
| 82 } | 72 } |
| 83 } | 73 } |
| 84 this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTyp
es.SecurityStateChanged, data); | 74 this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTyp
es.SecurityStateChanged, data); |
| 85 } | 75 } |
| 86 } | 76 } |
| OLD | NEW |