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

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

Issue 10956004: Notify host of initial client dimensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 * status has changed. 510 * status has changed.
511 * 511 *
512 * @private 512 * @private
513 * @param {number} status The plugin's status. 513 * @param {number} status The plugin's status.
514 * @param {number} error The plugin's error state, if any. 514 * @param {number} error The plugin's error state, if any.
515 */ 515 */
516 remoting.ClientSession.prototype.onConnectionStatusUpdate_ = 516 remoting.ClientSession.prototype.onConnectionStatusUpdate_ =
517 function(status, error) { 517 function(status, error) {
518 if (status == remoting.ClientSession.State.CONNECTED) { 518 if (status == remoting.ClientSession.State.CONNECTED) {
519 this.onDesktopSizeChanged_(); 519 this.onDesktopSizeChanged_();
520 this.plugin.notifyClientDimensions(window.innerWidth, window.innerHeight)
Wez 2012/09/20 18:15:36 nit: Just call this.onResize_() here?
Jamie 2012/09/20 18:26:56 That would defer the resize for 1s, which isn't wh
520 } else if (status == remoting.ClientSession.State.FAILED) { 521 } else if (status == remoting.ClientSession.State.FAILED) {
521 this.error = /** @type {remoting.ClientSession.ConnectionError} */ (error); 522 this.error = /** @type {remoting.ClientSession.ConnectionError} */ (error);
522 } 523 }
523 this.setState_(/** @type {remoting.ClientSession.State} */ (status)); 524 this.setState_(/** @type {remoting.ClientSession.State} */ (status));
524 }; 525 };
525 526
526 /** 527 /**
527 * Callback that the plugin invokes to indicate when the connection is 528 * Callback that the plugin invokes to indicate when the connection is
528 * ready. 529 * ready.
529 * 530 *
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 var lateAdjustment = 1 + (now - expected) / timeout; 838 var lateAdjustment = 1 + (now - expected) / timeout;
838 if (!that.scroll_(lateAdjustment * dx, lateAdjustment * dy)) { 839 if (!that.scroll_(lateAdjustment * dx, lateAdjustment * dy)) {
839 that.bumpScrollTimer_ = window.setTimeout( 840 that.bumpScrollTimer_ = window.setTimeout(
840 function() { repeatScroll(now + timeout); }, 841 function() { repeatScroll(now + timeout); },
841 timeout); 842 timeout);
842 } 843 }
843 }; 844 };
844 repeatScroll(new Date().getTime()); 845 repeatScroll(new Date().getTime());
845 } 846 }
846 }; 847 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698