Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: remoting/webapp/video_frame_recorder.js

Issue 552403004: Interfaceify ClientPlugin in preparation for mocking it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Interfaceify more classes. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698