Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 /** | 6 /** |
| 7 * @constructor | 7 * @constructor |
| 8 * @extends {WebInspector.SDKModel} | 8 * @extends {WebInspector.SDKModel} |
| 9 * @param {!WebInspector.Target} target | 9 * @param {!WebInspector.Target} target |
| 10 */ | 10 */ |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 876 WebInspector.AnimationModel.ScreenshotCapture = function(target, model) | 876 WebInspector.AnimationModel.ScreenshotCapture = function(target, model) |
| 877 { | 877 { |
| 878 this._target = target; | 878 this._target = target; |
| 879 /** @type {!Array<!WebInspector.AnimationModel.ScreenshotCapture.Request>} * / | 879 /** @type {!Array<!WebInspector.AnimationModel.ScreenshotCapture.Request>} * / |
| 880 this._requests = []; | 880 this._requests = []; |
| 881 this._target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.ScreencastFrame, this._screencastFrame, this); | 881 this._target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.ScreencastFrame, this._screencastFrame, this); |
| 882 this._model = model; | 882 this._model = model; |
| 883 this._model.addEventListener(WebInspector.AnimationModel.Events.ModelReset, this._stopScreencast, this); | 883 this._model.addEventListener(WebInspector.AnimationModel.Events.ModelReset, this._stopScreencast, this); |
| 884 } | 884 } |
| 885 | 885 |
| 886 /** @typedef {{ time: number, endTime: number, screenshots: !Array.<string>}} */ | 886 /** @typedef {{ time: (number|undefined), endTime: number, screenshots: !Array.< string>}} */ |
|
lushnikov
2016/03/04 22:49:18
looks like "time" is never used
kozy
2016/03/04 23:18:50
Done.
| |
| 887 WebInspector.AnimationModel.ScreenshotCapture.Request; | 887 WebInspector.AnimationModel.ScreenshotCapture.Request; |
| 888 | 888 |
| 889 WebInspector.AnimationModel.ScreenshotCapture.prototype = { | 889 WebInspector.AnimationModel.ScreenshotCapture.prototype = { |
| 890 /** | 890 /** |
| 891 * @param {number} duration | 891 * @param {number} duration |
| 892 * @param {!Array<string>} screenshots | 892 * @param {!Array<string>} screenshots |
| 893 */ | 893 */ |
| 894 captureScreenshots: function(duration, screenshots) | 894 captureScreenshots: function(duration, screenshots) |
| 895 { | 895 { |
| 896 var screencastDuration = Math.min(duration / this._model._playbackRate, 3000); | 896 var screencastDuration = Math.min(duration / this._model._playbackRate, 3000); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 938 if (!this._capturing) | 938 if (!this._capturing) |
| 939 return; | 939 return; |
| 940 | 940 |
| 941 delete this._stopTimer; | 941 delete this._stopTimer; |
| 942 delete this._endTime; | 942 delete this._endTime; |
| 943 this._requests = []; | 943 this._requests = []; |
| 944 this._capturing = false; | 944 this._capturing = false; |
| 945 this._target.pageAgent().stopScreencast(); | 945 this._target.pageAgent().stopScreencast(); |
| 946 } | 946 } |
| 947 } | 947 } |
| OLD | NEW |