| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 113 } |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 /** | 116 /** |
| 117 * @param {!remoting.ConnectionInfo} connectionInfo | 117 * @param {!remoting.ConnectionInfo} connectionInfo |
| 118 */ | 118 */ |
| 119 remoting.Me2MeActivity.prototype.onConnected = function(connectionInfo) { | 119 remoting.Me2MeActivity.prototype.onConnected = function(connectionInfo) { |
| 120 // Reset the refresh flag so that the next connection will retry if needed. | 120 // Reset the refresh flag so that the next connection will retry if needed. |
| 121 this.retryOnHostOffline_ = true; | 121 this.retryOnHostOffline_ = true; |
| 122 | 122 |
| 123 var plugin = connectionInfo.plugin(); |
| 123 if (remoting.app.hasCapability(remoting.ClientSession.Capability.CAST)) { | 124 if (remoting.app.hasCapability(remoting.ClientSession.Capability.CAST)) { |
| 124 this.connector_.registerProtocolExtension( | 125 plugin.extensions().register(new remoting.CastExtensionHandler()); |
| 125 new remoting.CastExtensionHandler()); | |
| 126 } | 126 } |
| 127 this.connector_.registerProtocolExtension(new remoting.GnubbyAuthHandler()); | 127 plugin.extensions().register(new remoting.GnubbyAuthHandler()); |
| 128 this.pinDialog_.requestPairingIfNecessary(connectionInfo.plugin(), | 128 this.pinDialog_.requestPairingIfNecessary(connectionInfo.plugin(), |
| 129 this.connector_); | 129 this.connector_); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 remoting.Me2MeActivity.prototype.onDisconnected = function() { | 132 remoting.Me2MeActivity.prototype.onDisconnected = function() { |
| 133 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_ME2ME); | 133 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_ME2ME); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 /** | 136 /** |
| 137 * @param {!remoting.Error} error | 137 * @param {!remoting.Error} error |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 clientName = 'Linux'; | 283 clientName = 'Linux'; |
| 284 } else { | 284 } else { |
| 285 console.log('Unrecognized client platform. Using navigator.platform.'); | 285 console.log('Unrecognized client platform. Using navigator.platform.'); |
| 286 clientName = navigator.platform; | 286 clientName = navigator.platform; |
| 287 } | 287 } |
| 288 plugin.requestPairing(clientName, onPairingComplete); | 288 plugin.requestPairing(clientName, onPairingComplete); |
| 289 } | 289 } |
| 290 }; | 290 }; |
| 291 | 291 |
| 292 })(); | 292 })(); |
| OLD | NEW |