| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 this.connectedView_ = new remoting.DesktopConnectedView( | 177 this.connectedView_ = new remoting.DesktopConnectedView( |
| 178 document.getElementById('client-container'), connectionInfo); | 178 document.getElementById('client-container'), connectionInfo); |
| 179 | 179 |
| 180 // By default, under ChromeOS, remap the right Control key to the right | 180 // By default, under ChromeOS, remap the right Control key to the right |
| 181 // Win / Cmd key. | 181 // Win / Cmd key. |
| 182 if (remoting.platformIsChromeOS()) { | 182 if (remoting.platformIsChromeOS()) { |
| 183 connectionInfo.plugin().setRemapKeys('0x0700e4>0x0700e7'); | 183 connectionInfo.plugin().setRemapKeys('0x0700e4>0x0700e7'); |
| 184 } | 184 } |
| 185 | 185 |
| 186 var plugin = connectionInfo.plugin(); |
| 186 if (remoting.app.getConnectionMode() === remoting.Application.Mode.ME2ME) { | 187 if (remoting.app.getConnectionMode() === remoting.Application.Mode.ME2ME) { |
| 187 if (remoting.app.hasCapability(remoting.ClientSession.Capability.CAST)) { | 188 if (remoting.app.hasCapability(remoting.ClientSession.Capability.CAST)) { |
| 188 this.sessionConnector_.registerProtocolExtension( | 189 plugin.extensions().register(new remoting.CastExtensionHandler()); |
| 189 new remoting.CastExtensionHandler()); | |
| 190 } | 190 } |
| 191 this.sessionConnector_.registerProtocolExtension( | 191 plugin.extensions().register(new remoting.GnubbyAuthHandler()); |
| 192 new remoting.GnubbyAuthHandler()); | |
| 193 } | 192 } |
| 194 if (connectionInfo.session().hasCapability( | 193 if (connectionInfo.session().hasCapability( |
| 195 remoting.ClientSession.Capability.VIDEO_RECORDER)) { | 194 remoting.ClientSession.Capability.VIDEO_RECORDER)) { |
| 196 var recorder = new remoting.VideoFrameRecorder(); | 195 var recorder = new remoting.VideoFrameRecorder(); |
| 197 this.sessionConnector_.registerProtocolExtension(recorder); | 196 plugin.extensions().register(recorder); |
| 198 this.connectedView_.setVideoFrameRecorder(recorder); | 197 this.connectedView_.setVideoFrameRecorder(recorder); |
| 199 } | 198 } |
| 200 | 199 |
| 201 if (remoting.pairingRequested) { | 200 if (remoting.pairingRequested) { |
| 202 var that = this; | 201 var that = this; |
| 203 /** | 202 /** |
| 204 * @param {string} clientId | 203 * @param {string} clientId |
| 205 * @param {string} sharedSecret | 204 * @param {string} sharedSecret |
| 206 */ | 205 */ |
| 207 var onPairingComplete = function(clientId, sharedSecret) { | 206 var onPairingComplete = function(clientId, sharedSecret) { |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 372 |
| 374 /** | 373 /** |
| 375 * Entry-point for It2Me connections. | 374 * Entry-point for It2Me connections. |
| 376 * | 375 * |
| 377 * @private | 376 * @private |
| 378 */ | 377 */ |
| 379 remoting.DesktopRemoting.prototype.connectIt2Me_ = function() { | 378 remoting.DesktopRemoting.prototype.connectIt2Me_ = function() { |
| 380 var flow = new remoting.It2MeConnectFlow(this.sessionConnector_); | 379 var flow = new remoting.It2MeConnectFlow(this.sessionConnector_); |
| 381 flow.start(); | 380 flow.start(); |
| 382 }; | 381 }; |
| OLD | NEW |