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

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

Issue 1001503006: [Webapp Refactor] remoting.ConnectedView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/remoting_webapp_files.gypi ('k') | remoting/webapp/crd/js/connected_view.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * Class handling creation and teardown of a remoting client session. 7 * Class handling creation and teardown of a remoting client session.
8 * 8 *
9 * The ClientSession class controls lifetime of the client plugin 9 * The ClientSession class controls lifetime of the client plugin
10 * object and provides the plugin with the functionality it needs to 10 * object and provides the plugin with the functionality it needs to
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 * Callback that the plugin invokes to indicate that the connection 383 * Callback that the plugin invokes to indicate that the connection
384 * status has changed. 384 * status has changed.
385 * 385 *
386 * @param {remoting.ClientSession.State} status The plugin's status. 386 * @param {remoting.ClientSession.State} status The plugin's status.
387 * @param {remoting.ClientSession.ConnectionError} error The plugin's error 387 * @param {remoting.ClientSession.ConnectionError} error The plugin's error
388 * state, if any. 388 * state, if any.
389 */ 389 */
390 remoting.ClientSession.prototype.onConnectionStatusUpdate = 390 remoting.ClientSession.prototype.onConnectionStatusUpdate =
391 function(status, error) { 391 function(status, error) {
392 if (status == remoting.ClientSession.State.CONNECTED) { 392 if (status == remoting.ClientSession.State.CONNECTED) {
393 remoting.desktopConnectedView.updateClientSessionUi_(this); 393 remoting.desktopConnectedView.onConnected();
394
395 } else if (status == remoting.ClientSession.State.FAILED) { 394 } else if (status == remoting.ClientSession.State.FAILED) {
396 switch (error) { 395 switch (error) {
397 case remoting.ClientSession.ConnectionError.HOST_IS_OFFLINE: 396 case remoting.ClientSession.ConnectionError.HOST_IS_OFFLINE:
398 this.error_ = remoting.Error.HOST_IS_OFFLINE; 397 this.error_ = remoting.Error.HOST_IS_OFFLINE;
399 break; 398 break;
400 case remoting.ClientSession.ConnectionError.SESSION_REJECTED: 399 case remoting.ClientSession.ConnectionError.SESSION_REJECTED:
401 this.error_ = remoting.Error.INVALID_ACCESS_CODE; 400 this.error_ = remoting.Error.INVALID_ACCESS_CODE;
402 break; 401 break;
403 case remoting.ClientSession.ConnectionError.INCOMPATIBLE_PROTOCOL: 402 case remoting.ClientSession.ConnectionError.INCOMPATIBLE_PROTOCOL:
404 this.error_ = remoting.Error.INCOMPATIBLE_PROTOCOL; 403 this.error_ = remoting.Error.INCOMPATIBLE_PROTOCOL;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 */ 707 */
709 remoting.ClientSession.prototype.enableDebugRegion = function(enable) { 708 remoting.ClientSession.prototype.enableDebugRegion = function(enable) {
710 if (enable) { 709 if (enable) {
711 this.plugin_.setDebugDirtyRegionHandler( 710 this.plugin_.setDebugDirtyRegionHandler(
712 remoting.desktopConnectedView.handleDebugRegion.bind( 711 remoting.desktopConnectedView.handleDebugRegion.bind(
713 remoting.desktopConnectedView)); 712 remoting.desktopConnectedView));
714 } else { 713 } else {
715 this.plugin_.setDebugDirtyRegionHandler(null); 714 this.plugin_.setDebugDirtyRegionHandler(null);
716 } 715 }
717 } 716 }
OLDNEW
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/crd/js/connected_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698