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 * 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 Loading... |
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 Loading... |
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; |
OLD | NEW |