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

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

Issue 1016623002: [Webapp Refactor] Reparent the ConnectedView into the delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Baseline 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
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 /** 290 /**
291 * Called when the current session has reached the point where the host has 291 * Called when the current session has reached the point where the host has
292 * started streaming video frames to the client. 292 * started streaming video frames to the client.
293 * 293 *
294 * @return {void} Nothing. 294 * @return {void} Nothing.
295 */ 295 */
296 remoting.DesktopRemoting.prototype.handleVideoStreamingStarted = function() { 296 remoting.DesktopRemoting.prototype.handleVideoStreamingStarted = function() {
297 }; 297 };
298 298
299 /** 299 /**
300 * @param {string} type The type of the extension message.
301 * @param {Object} message The parsed extension message data.
302 * @return {boolean} Return true if the extension message was recognized.
303 */
304 remoting.DesktopRemoting.prototype.handleExtensionMessage = function(
305 type, message) {
306 return false;
307 };
308
309 /**
310 * Called when an error needs to be displayed to the user. 300 * Called when an error needs to be displayed to the user.
311 * 301 *
312 * @param {!remoting.Error} error The error to be localized and displayed. 302 * @param {!remoting.Error} error The error to be localized and displayed.
313 * @return {void} Nothing. 303 * @return {void} Nothing.
314 */ 304 */
315 remoting.DesktopRemoting.prototype.handleError = function(error) { 305 remoting.DesktopRemoting.prototype.handleError = function(error) {
316 console.error('Connection failed: ' + error.toString()); 306 console.error('Connection failed: ' + error.toString());
317 remoting.accessCode = ''; 307 remoting.accessCode = '';
Jamie 2015/03/18 01:03:56 Did you intend to remove this?
kelvinp 2015/03/18 18:44:21 Yes, it is not being used any where.
318 308
319 if (error.hasTag(remoting.Error.Tag.AUTHENTICATION_FAILED)) { 309 if (error.hasTag(remoting.Error.Tag.AUTHENTICATION_FAILED)) {
320 remoting.setMode(remoting.AppMode.HOME); 310 remoting.setMode(remoting.AppMode.HOME);
321 remoting.handleAuthFailureAndRelaunch(); 311 remoting.handleAuthFailureAndRelaunch();
322 return; 312 return;
323 } 313 }
324 314
325 // Reset the refresh flag so that the next connection will retry if needed. 315 // Reset the refresh flag so that the next connection will retry if needed.
326 this.refreshHostJidIfOffline_ = true; 316 this.refreshHostJidIfOffline_ = true;
327 317
328 var errorDiv = document.getElementById('connect-error-message'); 318 var errorDiv = document.getElementById('connect-error-message');
329 l10n.localizeElementFromTag(errorDiv, error.getTag()); 319 l10n.localizeElementFromTag(errorDiv, error.getTag());
330 320
331 var mode = remoting.clientSession ? remoting.desktopConnectedView.getMode() 321 var mode = remoting.clientSession ? remoting.desktopConnectedView.getMode()
332 : this.app_.getSessionConnector().getConnectionMode(); 322 : this.app_.getSessionConnector().getConnectionMode();
333 if (mode == remoting.DesktopConnectedView.Mode.IT2ME) { 323 if (mode == remoting.DesktopConnectedView.Mode.IT2ME) {
334 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME); 324 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME);
335 } else { 325 } else {
336 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME); 326 remoting.setMode(remoting.AppMode.CLIENT_CONNECT_FAILED_ME2ME);
337 } 327 }
338 }; 328 };
339 329
340 /** 330 /**
341 * No cleanup required for desktop remoting. 331 * No cleanup required for desktop remoting.
342 */ 332 */
343 remoting.DesktopRemoting.prototype.handleExit = function() { 333 remoting.DesktopRemoting.prototype.handleExit = function() {
344 }; 334 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/cast_extension_handler.js ('k') | remoting/webapp/crd/js/gnubby_auth_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698