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

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

Issue 17288017: Disable scroll-bars in shrink-to-fit mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | remoting/webapp/main.css » ('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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 var options = {}; 645 var options = {};
646 options[remoting.ClientSession.KEY_SHRINK_TO_FIT] = this.shrinkToFit_; 646 options[remoting.ClientSession.KEY_SHRINK_TO_FIT] = this.shrinkToFit_;
647 options[remoting.ClientSession.KEY_RESIZE_TO_CLIENT] = this.resizeToClient_; 647 options[remoting.ClientSession.KEY_RESIZE_TO_CLIENT] = this.resizeToClient_;
648 remoting.HostSettings.save(this.hostId, options); 648 remoting.HostSettings.save(this.hostId, options);
649 } 649 }
650 650
651 this.updateDimensions(); 651 this.updateDimensions();
652 if (needsScrollReset) { 652 if (needsScrollReset) {
653 this.scroll_(0, 0); 653 this.scroll_(0, 0);
654 } 654 }
655
656 // TODO(jamiewalch): crbug.com/252796: Remove this once crbug.com/240772
657 // is fixed.
658 if (this.shrinkToFit_) {
659 document.body.parentNode.classList.add('no-scroll');
Wez 2013/06/21 19:01:05 I assume that classList has set behaviour, i.e. it
Jamie 2013/06/21 19:21:27 Correct.
660 } else {
661 document.body.parentNode.classList.remove('no-scroll');
662 }
655 } 663 }
656 664
657 /** 665 /**
658 * Called when the client receives its first frame. 666 * Called when the client receives its first frame.
659 * 667 *
660 * @return {void} Nothing. 668 * @return {void} Nothing.
661 */ 669 */
662 remoting.ClientSession.prototype.onFirstFrameReceived = function() { 670 remoting.ClientSession.prototype.onFirstFrameReceived = function() {
663 this.hasReceivedFrame_ = true; 671 this.hasReceivedFrame_ = true;
664 }; 672 };
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 var lateAdjustment = 1 + (now - expected) / timeout; 1241 var lateAdjustment = 1 + (now - expected) / timeout;
1234 if (!that.scroll_(lateAdjustment * dx, lateAdjustment * dy)) { 1242 if (!that.scroll_(lateAdjustment * dx, lateAdjustment * dy)) {
1235 that.bumpScrollTimer_ = window.setTimeout( 1243 that.bumpScrollTimer_ = window.setTimeout(
1236 function() { repeatScroll(now + timeout); }, 1244 function() { repeatScroll(now + timeout); },
1237 timeout); 1245 timeout);
1238 } 1246 }
1239 }; 1247 };
1240 repeatScroll(new Date().getTime()); 1248 repeatScroll(new Date().getTime());
1241 } 1249 }
1242 }; 1250 };
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/main.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698