| OLD | NEW |
| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * This variable is checked in SelectFileDialogExtensionBrowserTest. | 8 * This variable is checked in SelectFileDialogExtensionBrowserTest. |
| 9 * @type {number} | 9 * @type {number} |
| 10 */ | 10 */ |
| (...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 * Respond to the back and forward buttons. | 1601 * Respond to the back and forward buttons. |
| 1602 * @param {Event} event Pop state event. | 1602 * @param {Event} event Pop state event. |
| 1603 * @private | 1603 * @private |
| 1604 */ | 1604 */ |
| 1605 FileManager.prototype.onPopState_ = function(event) { | 1605 FileManager.prototype.onPopState_ = function(event) { |
| 1606 this.closeFilePopup_(); | 1606 this.closeFilePopup_(); |
| 1607 this.setupCurrentDirectory_(false /* page loading */); | 1607 this.setupCurrentDirectory_(false /* page loading */); |
| 1608 }; | 1608 }; |
| 1609 | 1609 |
| 1610 /** | 1610 /** |
| 1611 * @param {number=} opt_timeout Timeout in milliseconds. | |
| 1612 * @private | |
| 1613 */ | |
| 1614 FileManager.prototype.requestResize_ = function(opt_timeout) { | |
| 1615 setTimeout(this.onResize_.bind(this), opt_timeout || 0); | |
| 1616 }; | |
| 1617 | |
| 1618 /** | |
| 1619 * Resize details and thumb views to fit the new window size. | 1611 * Resize details and thumb views to fit the new window size. |
| 1620 * @private | 1612 * @private |
| 1621 */ | 1613 */ |
| 1622 FileManager.prototype.onResize_ = function() { | 1614 FileManager.prototype.onResize_ = function() { |
| 1623 if (this.listType_ == FileManager.ListType.THUMBNAIL) { | 1615 if (this.listType_ == FileManager.ListType.THUMBNAIL) { |
| 1624 var g = this.grid_; | 1616 var g = this.grid_; |
| 1625 if (this.resizeGridTimer_) { | 1617 if (this.resizeGridTimer_) { |
| 1626 clearTimeout(this.resizeGridTimer_); | 1618 clearTimeout(this.resizeGridTimer_); |
| 1627 this.resizeGridTimer_ = null; | 1619 this.resizeGridTimer_ = null; |
| 1628 } | 1620 } |
| (...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3938 * Set the flag expressing whether the ctrl key is pressed or not. | 3930 * Set the flag expressing whether the ctrl key is pressed or not. |
| 3939 * @param {boolean} flag New value of the flag | 3931 * @param {boolean} flag New value of the flag |
| 3940 * @private | 3932 * @private |
| 3941 */ | 3933 */ |
| 3942 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { | 3934 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { |
| 3943 this.ctrlKeyPressed_ = flag; | 3935 this.ctrlKeyPressed_ = flag; |
| 3944 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); | 3936 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); |
| 3945 this.document_.querySelector('#drive-reload').canExecuteChange(); | 3937 this.document_.querySelector('#drive-reload').canExecuteChange(); |
| 3946 }; | 3938 }; |
| 3947 })(); | 3939 })(); |
| OLD | NEW |