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 * @unrestricted | 5 * @unrestricted |
6 */ | 6 */ |
7 Security.SecurityModel = class extends SDK.SDKModel { | 7 Security.SecurityModel = class extends SDK.SDKModel { |
8 /** | 8 /** |
9 * @param {!SDK.Target} target | 9 * @param {!SDK.Target} target |
| 10 * @param {!Protocol.Dispatcher} dispatcher |
10 */ | 11 */ |
11 constructor(target) { | 12 constructor(target, dispatcher) { |
12 super(target); | 13 super(target, dispatcher); |
13 this._dispatcher = new Security.SecurityDispatcher(this); | 14 this._securityAgent = dispatcher.securityAgent(); |
14 this._securityAgent = target.securityAgent(); | 15 dispatcher.registerSecurityDispatcher(new Security.SecurityDispatcher(this))
; |
15 target.registerSecurityDispatcher(this._dispatcher); | |
16 this._securityAgent.enable(); | 16 this._securityAgent.enable(); |
17 } | 17 } |
18 | 18 |
19 /** | 19 /** |
20 * @return {!SDK.ResourceTreeModel} | 20 * @return {!SDK.ResourceTreeModel} |
21 */ | 21 */ |
22 resourceTreeModel() { | 22 resourceTreeModel() { |
23 return /** @type {!SDK.ResourceTreeModel} */ (this.target().model(SDK.Resour
ceTreeModel)); | 23 return /** @type {!SDK.ResourceTreeModel} */ (this.target().model(SDK.Resour
ceTreeModel)); |
24 } | 24 } |
25 | 25 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 /** | 119 /** |
120 * @override | 120 * @override |
121 * @param {number} eventId | 121 * @param {number} eventId |
122 * @param {string} errorType | 122 * @param {string} errorType |
123 * @param {string} requestURL | 123 * @param {string} requestURL |
124 */ | 124 */ |
125 certificateError(eventId, errorType, requestURL) { | 125 certificateError(eventId, errorType, requestURL) { |
126 } | 126 } |
127 }; | 127 }; |
OLD | NEW |