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

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

Issue 1010053002: [Webapp Refactor] Implements remoting.ConnectionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 9 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/connection_info.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 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Win / Cmd key. 159 // Win / Cmd key.
160 if (remoting.platformIsChromeOS()) { 160 if (remoting.platformIsChromeOS()) {
161 remapKeys = '0x0700e4>0x0700e7'; 161 remapKeys = '0x0700e4>0x0700e7';
162 } 162 }
163 return remapKeys; 163 return remapKeys;
164 }; 164 };
165 165
166 /** 166 /**
167 * Called when a new session has been connected. 167 * Called when a new session has been connected.
168 * 168 *
169 * @param {remoting.ClientSession} clientSession 169 * @param {remoting.ConnectionInfo} connectionInfo
170 * @return {void} Nothing. 170 * @return {void} Nothing.
171 */ 171 */
172 remoting.DesktopRemoting.prototype.handleConnected = function(clientSession) { 172 remoting.DesktopRemoting.prototype.handleConnected = function(connectionInfo) {
173 // Set the text on the buttons shown under the error message so that they are 173 // Set the text on the buttons shown under the error message so that they are
174 // easy to understand in the case where a successful connection failed, as 174 // easy to understand in the case where a successful connection failed, as
175 // opposed to the case where a connection never succeeded. 175 // opposed to the case where a connection never succeeded.
176 // TODO(garykac): Investigate to see if these need to be reverted to their 176 // TODO(garykac): Investigate to see if these need to be reverted to their
177 // original values in the onDisconnected method. 177 // original values in the onDisconnected method.
178 var button1 = document.getElementById('client-reconnect-button'); 178 var button1 = document.getElementById('client-reconnect-button');
179 l10n.localizeElementFromTag(button1, /*i18n-content*/'RECONNECT'); 179 l10n.localizeElementFromTag(button1, /*i18n-content*/'RECONNECT');
180 button1.removeAttribute('autofocus'); 180 button1.removeAttribute('autofocus');
181 var button2 = document.getElementById('client-finished-me2me-button'); 181 var button2 = document.getElementById('client-finished-me2me-button');
182 l10n.localizeElementFromTag(button2, /*i18n-content*/'OK'); 182 l10n.localizeElementFromTag(button2, /*i18n-content*/'OK');
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } else if (remoting.platformIsWindows()) { 228 } else if (remoting.platformIsWindows()) {
229 clientName = 'Windows'; 229 clientName = 'Windows';
230 } else if (remoting.platformIsChromeOS()) { 230 } else if (remoting.platformIsChromeOS()) {
231 clientName = 'ChromeOS'; 231 clientName = 'ChromeOS';
232 } else if (remoting.platformIsLinux()) { 232 } else if (remoting.platformIsLinux()) {
233 clientName = 'Linux'; 233 clientName = 'Linux';
234 } else { 234 } else {
235 console.log('Unrecognized client platform. Using navigator.platform.'); 235 console.log('Unrecognized client platform. Using navigator.platform.');
236 clientName = navigator.platform; 236 clientName = navigator.platform;
237 } 237 }
238 clientSession.requestPairing(clientName, onPairingComplete); 238 connectionInfo.session().requestPairing(clientName, onPairingComplete);
239 } 239 }
240 }; 240 };
241 241
242 /** 242 /**
243 * Called when the current session has been disconnected. 243 * Called when the current session has been disconnected.
244 * 244 *
245 * @return {void} Nothing. 245 * @return {void} Nothing.
246 */ 246 */
247 remoting.DesktopRemoting.prototype.handleDisconnected = function() { 247 remoting.DesktopRemoting.prototype.handleDisconnected = function() {
248 if (remoting.desktopConnectedView.getMode() == 248 if (remoting.desktopConnectedView.getMode() ==
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } else { 335 } else {
336 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); 336 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME);
337 } 337 }
338 }; 338 };
339 339
340 /** 340 /**
341 * No cleanup required for desktop remoting. 341 * No cleanup required for desktop remoting.
342 */ 342 */
343 remoting.DesktopRemoting.prototype.handleExit = function() { 343 remoting.DesktopRemoting.prototype.handleExit = function() {
344 }; 344 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/connection_info.js ('k') | remoting/webapp/crd/js/session_connector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698