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

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

Issue 1067133002: Move ProtocolExtensionManager from SessionConnector into its own class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and Reviewer's feedback Created 5 years, 8 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
« no previous file with comments | « remoting/webapp/crd/js/desktop_remoting.js ('k') | remoting/webapp/crd/js/session_connector.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 })();
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/desktop_remoting.js ('k') | remoting/webapp/crd/js/session_connector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698