| Index: Source/devtools/front_end/sdk/SecurityManager.js
|
| diff --git a/Source/devtools/front_end/sdk/SecurityManager.js b/Source/devtools/front_end/sdk/SecurityManager.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2cc5f051158ae76a3322febcc78483d73570611b
|
| --- /dev/null
|
| +++ b/Source/devtools/front_end/sdk/SecurityManager.js
|
| @@ -0,0 +1,49 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +/**
|
| + * @constructor
|
| + * @extends {WebInspector.SDKModel}
|
| + * @param {!WebInspector.Target} target
|
| + */
|
| +WebInspector.SecurityManager = function(target)
|
| +{
|
| + WebInspector.SDKModel.call(this, WebInspector.SecurityManager, target);
|
| + this._dispatcher = new WebInspector.SecurityDispatcher(this);
|
| + this._target = target;
|
| + this._securityAgent = target.securityAgent();
|
| + target.registerSecurityDispatcher(this._dispatcher);
|
| + this._securityAgent.enable();
|
| +}
|
| +
|
| +WebInspector.SecurityManager.EventTypes = {
|
| + SecurityStateChanged: "SecurityStateChanged"
|
| +}
|
| +
|
| +WebInspector.SecurityManager.prototype = {
|
| + targetAdded: function () {},
|
| + __proto__: WebInspector.SDKModel.prototype
|
| +}
|
| +
|
| +/**
|
| + * @constructor
|
| + * @implements {SecurityAgent.Dispatcher}
|
| + */
|
| +WebInspector.SecurityDispatcher = function(manager)
|
| +{
|
| + this._manager = manager;
|
| +}
|
| +
|
| +WebInspector.SecurityDispatcher.prototype = {
|
| + /**
|
| + * @override
|
| + * @param {!SecurityAgent.SecurityState} securityState
|
| + */
|
| + securityStateChanged: function(securityState)
|
| + {
|
| + // console.log("DISPATCHING security state", securityState);
|
| + this._manager.dispatchEventToListeners(WebInspector.SecurityManager.EventTypes.SecurityStateChanged, securityState);
|
| + return;
|
| + }
|
| +}
|
|
|