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

Side by Side Diff: remoting/webapp/crd/js/desktop_remoting.js

Issue 1028803002: [Chromoting] Convert VideoFrameRecorder into a proper protocol extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 5 years, 9 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 * This class implements the functionality that is specific to desktop 7 * This class implements the functionality that is specific to desktop
8 * remoting ("Chromoting" or CRD). 8 * remoting ("Chromoting" or CRD).
9 */ 9 */
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 this.connectedView_ = new remoting.DesktopConnectedView( 188 this.connectedView_ = new remoting.DesktopConnectedView(
189 document.getElementById('client-container'), connectionInfo); 189 document.getElementById('client-container'), connectionInfo);
190 190
191 // By default, under ChromeOS, remap the right Control key to the right 191 // By default, under ChromeOS, remap the right Control key to the right
192 // Win / Cmd key. 192 // Win / Cmd key.
193 if (remoting.platformIsChromeOS()) { 193 if (remoting.platformIsChromeOS()) {
194 connectionInfo.plugin().setRemapKeys('0x0700e4>0x0700e7'); 194 connectionInfo.plugin().setRemapKeys('0x0700e4>0x0700e7');
195 } 195 }
196 196
197 var sessionConnector = remoting.app.getSessionConnector();
197 if (connectionInfo.mode() === remoting.DesktopConnectedView.Mode.ME2ME) { 198 if (connectionInfo.mode() === remoting.DesktopConnectedView.Mode.ME2ME) {
198 var sessionConnector = remoting.app.getSessionConnector();
199 if (remoting.app.hasCapability(remoting.ClientSession.Capability.CAST)) { 199 if (remoting.app.hasCapability(remoting.ClientSession.Capability.CAST)) {
200 sessionConnector.registerProtocolExtension( 200 sessionConnector.registerProtocolExtension(
201 new remoting.CastExtensionHandler()); 201 new remoting.CastExtensionHandler());
202 } 202 }
203 sessionConnector.registerProtocolExtension( 203 sessionConnector.registerProtocolExtension(
204 new remoting.GnubbyAuthHandler()); 204 new remoting.GnubbyAuthHandler());
205 } 205 }
206 if (connectionInfo.session().hasCapability(
207 remoting.ClientSession.Capability.VIDEO_RECORDER)) {
208 var recorder = new remoting.VideoFrameRecorder();
209 sessionConnector.registerProtocolExtension(recorder);
210 this.connectedView_.setVideoFrameRecorder(recorder);
211 }
206 212
207 if (remoting.pairingRequested) { 213 if (remoting.pairingRequested) {
208 /** 214 /**
209 * @param {string} clientId 215 * @param {string} clientId
210 * @param {string} sharedSecret 216 * @param {string} sharedSecret
211 */ 217 */
212 var onPairingComplete = function(clientId, sharedSecret) { 218 var onPairingComplete = function(clientId, sharedSecret) {
213 var connector = remoting.app.getSessionConnector(); 219 var connector = remoting.app.getSessionConnector();
214 var host = remoting.hostList.getHostForId(connector.getHostId()); 220 var host = remoting.hostList.getHostForId(connector.getHostId());
215 host.options.pairingInfo.clientId = clientId; 221 host.options.pairingInfo.clientId = clientId;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 /** @returns {remoting.DesktopConnectedView} */ 384 /** @returns {remoting.DesktopConnectedView} */
379 remoting.DesktopRemoting.prototype.getConnectedViewForTesting = function() { 385 remoting.DesktopRemoting.prototype.getConnectedViewForTesting = function() {
380 return this.connectedView_; 386 return this.connectedView_;
381 }; 387 };
382 388
383 /** 389 /**
384 * Global instance of remoting.DesktopRemoting used for testing. 390 * Global instance of remoting.DesktopRemoting used for testing.
385 * @type {remoting.DesktopRemoting} 391 * @type {remoting.DesktopRemoting}
386 */ 392 */
387 remoting.desktopDelegateForTesting = null; 393 remoting.desktopDelegateForTesting = null;
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/desktop_connected_view.js ('k') | remoting/webapp/crd/js/video_frame_recorder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698