| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
| 6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
| 7 | 7 |
| 8 (function() { | 8 (function() { |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 /** | 67 /** |
| 68 * @param {boolean} suppressHostOfflineError | 68 * @param {boolean} suppressHostOfflineError |
| 69 * @private | 69 * @private |
| 70 */ | 70 */ |
| 71 remoting.Me2MeActivity.prototype.connect_ = function(suppressHostOfflineError) { | 71 remoting.Me2MeActivity.prototype.connect_ = function(suppressHostOfflineError) { |
| 72 remoting.setMode(remoting.AppMode.CLIENT_CONNECTING); | 72 remoting.setMode(remoting.AppMode.CLIENT_CONNECTING); |
| 73 base.dispose(this.desktopActivity_); | 73 base.dispose(this.desktopActivity_); |
| 74 this.desktopActivity_ = new remoting.DesktopRemotingActivity(this); | 74 this.desktopActivity_ = new remoting.DesktopRemotingActivity(this); |
| 75 var connector = remoting.SessionConnector.factory.createConnector( | 75 remoting.app.setConnectionMode(remoting.Application.Mode.ME2ME); |
| 76 document.getElementById('client-container'), | 76 this.desktopActivity_.start(this.host_, this.createCredentialsProvider_(), |
| 77 remoting.app_capabilities(), | 77 suppressHostOfflineError); |
| 78 this.desktopActivity_); | |
| 79 | |
| 80 connector.connect( | |
| 81 remoting.Application.Mode.ME2ME, | |
| 82 this.host_, this.createCredentialsProvider_(), suppressHostOfflineError); | |
| 83 }; | 78 }; |
| 84 | 79 |
| 85 /** | 80 /** |
| 86 * @return {remoting.CredentialsProvider} | 81 * @return {remoting.CredentialsProvider} |
| 87 * @private | 82 * @private |
| 88 */ | 83 */ |
| 89 remoting.Me2MeActivity.prototype.createCredentialsProvider_ = function() { | 84 remoting.Me2MeActivity.prototype.createCredentialsProvider_ = function() { |
| 90 var host = this.host_; | 85 var host = this.host_; |
| 91 var that = this; | 86 var that = this; |
| 92 | 87 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 clientName = 'Linux'; | 313 clientName = 'Linux'; |
| 319 } else { | 314 } else { |
| 320 console.log('Unrecognized client platform. Using navigator.platform.'); | 315 console.log('Unrecognized client platform. Using navigator.platform.'); |
| 321 clientName = navigator.platform; | 316 clientName = navigator.platform; |
| 322 } | 317 } |
| 323 plugin.requestPairing(clientName, onPairingComplete); | 318 plugin.requestPairing(clientName, onPairingComplete); |
| 324 } | 319 } |
| 325 }; | 320 }; |
| 326 | 321 |
| 327 })(); | 322 })(); |
| OLD | NEW |