OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 * @implements {Protocol.PageDispatcher} | 6 * @implements {Protocol.PageDispatcher} |
7 */ | 7 */ |
8 SDK.ScreenCaptureModel = class extends SDK.SDKModel { | 8 SDK.ScreenCaptureModel = class extends SDK.SDKModel { |
9 /** | 9 /** |
10 * @param {!SDK.Target} target | 10 * @param {!SDK.Target} target |
| 11 * @param {!Protocol.Dispatcher} dispatcher |
11 */ | 12 */ |
12 constructor(target) { | 13 constructor(target, dispatcher) { |
13 super(target); | 14 super(target, dispatcher); |
14 this._agent = target.pageAgent(); | 15 this._agent = dispatcher.pageAgent(); |
15 /** @type {?function(string, !Protocol.Page.ScreencastFrameMetadata)} */ | 16 /** @type {?function(string, !Protocol.Page.ScreencastFrameMetadata)} */ |
16 this._onScreencastFrame = null; | 17 this._onScreencastFrame = null; |
17 /** @type {?function(boolean)} */ | 18 /** @type {?function(boolean)} */ |
18 this._onScreencastVisibilityChanged = null; | 19 this._onScreencastVisibilityChanged = null; |
19 target.registerPageDispatcher(this); | 20 dispatcher.registerPageDispatcher(this); |
20 } | 21 } |
21 | 22 |
22 /** | 23 /** |
23 * @param {string} format | 24 * @param {string} format |
24 * @param {number} quality | 25 * @param {number} quality |
25 * @param {number|undefined} width | 26 * @param {number|undefined} width |
26 * @param {number|undefined} height | 27 * @param {number|undefined} height |
27 * @param {number|undefined} everyNthFrame | 28 * @param {number|undefined} everyNthFrame |
28 * @param {function(string, !Protocol.Page.ScreencastFrameMetadata)} onFrame | 29 * @param {function(string, !Protocol.Page.ScreencastFrameMetadata)} onFrame |
29 * @param {function(boolean)} onVisibilityChanged | 30 * @param {function(boolean)} onVisibilityChanged |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 195 } |
195 | 196 |
196 /** | 197 /** |
197 * @override | 198 * @override |
198 */ | 199 */ |
199 navigationRequested() { | 200 navigationRequested() { |
200 } | 201 } |
201 }; | 202 }; |
202 | 203 |
203 SDK.SDKModel.register(SDK.ScreenCaptureModel, SDK.Target.Capability.ScreenCaptur
e, false); | 204 SDK.SDKModel.register(SDK.ScreenCaptureModel, SDK.Target.Capability.ScreenCaptur
e, false); |
OLD | NEW |