| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 * @fileoverview | 6 * @fileoverview |
| 7 * Class implement the video frame recorder extension client. | 7 * Class implement the video frame recorder extension client. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| 12 /** @suppress {duplicate} */ | 12 /** @suppress {duplicate} */ |
| 13 var remoting = remoting || {}; | 13 var remoting = remoting || {}; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * @constructor | 16 * @constructor |
| 17 * @param {remoting.ClientPlugin} plugin | 17 * @param {remoting.ClientPluginInterface} plugin |
| 18 */ | 18 */ |
| 19 remoting.VideoFrameRecorder = function(plugin) { | 19 remoting.VideoFrameRecorder = function(plugin) { |
| 20 this.fileWriter_ = null; | 20 this.fileWriter_ = null; |
| 21 this.isRecording_ = false; | 21 this.isRecording_ = false; |
| 22 this.plugin_ = plugin; | 22 this.plugin_ = plugin; |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Starts or stops video recording. | 26 * Starts or stops video recording. |
| 27 */ | 27 */ |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 remoting.VideoFrameRecorder.prototype.onWriteComplete_ = function(e) { | 143 remoting.VideoFrameRecorder.prototype.onWriteComplete_ = function(e) { |
| 144 console.log("Video frame write complete"); | 144 console.log("Video frame write complete"); |
| 145 this.fetchNextFrame_(); | 145 this.fetchNextFrame_(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 remoting.VideoFrameRecorder.prototype.fetchNextFrame_ = function() { | 148 remoting.VideoFrameRecorder.prototype.fetchNextFrame_ = function() { |
| 149 console.log("Request next video frame"); | 149 console.log("Request next video frame"); |
| 150 var data = { type: 'next-frame' } | 150 var data = { type: 'next-frame' } |
| 151 this.plugin_.sendClientMessage('video-recorder', JSON.stringify(data)); | 151 this.plugin_.sendClientMessage('video-recorder', JSON.stringify(data)); |
| 152 } | 152 } |
| OLD | NEW |