| 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 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 * | 1893 * |
| 1894 * @private | 1894 * @private |
| 1895 */ | 1895 */ |
| 1896 FileManager.prototype.openFilePopup_ = function(popup, closeCallback) { | 1896 FileManager.prototype.openFilePopup_ = function(popup, closeCallback) { |
| 1897 this.closeFilePopup_(); | 1897 this.closeFilePopup_(); |
| 1898 this.filePopup_ = popup; | 1898 this.filePopup_ = popup; |
| 1899 this.filePopupCloseCallback_ = closeCallback; | 1899 this.filePopupCloseCallback_ = closeCallback; |
| 1900 this.dialogDom_.appendChild(this.filePopup_); | 1900 this.dialogDom_.appendChild(this.filePopup_); |
| 1901 this.filePopup_.focus(); | 1901 this.filePopup_.focus(); |
| 1902 this.document_.body.setAttribute('overlay-visible', ''); | 1902 this.document_.body.setAttribute('overlay-visible', ''); |
| 1903 if (util.platform.newUI()) |
| 1904 this.document_.querySelector('#iframe-drag-area').hidden = false; |
| 1903 }; | 1905 }; |
| 1904 | 1906 |
| 1905 /** | 1907 /** |
| 1906 * @private | 1908 * @private |
| 1907 */ | 1909 */ |
| 1908 FileManager.prototype.closeFilePopup_ = function() { | 1910 FileManager.prototype.closeFilePopup_ = function() { |
| 1909 if (this.filePopup_) { | 1911 if (this.filePopup_) { |
| 1910 this.document_.body.removeAttribute('overlay-visible'); | 1912 this.document_.body.removeAttribute('overlay-visible'); |
| 1913 if (util.platform.newUI()) |
| 1914 this.document_.querySelector('#iframe-drag-area').hidden = true; |
| 1911 // The window resize would not be processed properly while the relevant | 1915 // The window resize would not be processed properly while the relevant |
| 1912 // divs had 'display:none', force resize after the layout fired. | 1916 // divs had 'display:none', force resize after the layout fired. |
| 1913 setTimeout(this.onResize_.bind(this), 0); | 1917 setTimeout(this.onResize_.bind(this), 0); |
| 1914 if (this.filePopup_.contentWindow && | 1918 if (this.filePopup_.contentWindow && |
| 1915 this.filePopup_.contentWindow.unload) { | 1919 this.filePopup_.contentWindow.unload) { |
| 1916 this.filePopup_.contentWindow.unload(); | 1920 this.filePopup_.contentWindow.unload(); |
| 1917 } | 1921 } |
| 1918 | 1922 |
| 1919 if (this.filePopupCloseCallback_) { | 1923 if (this.filePopupCloseCallback_) { |
| 1920 this.filePopupCloseCallback_(); | 1924 this.filePopupCloseCallback_(); |
| (...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3564 * Set the flag expressing whether the ctrl key is pressed or not. | 3568 * Set the flag expressing whether the ctrl key is pressed or not. |
| 3565 * @param {boolean} flag New value of the flag | 3569 * @param {boolean} flag New value of the flag |
| 3566 * @private | 3570 * @private |
| 3567 */ | 3571 */ |
| 3568 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { | 3572 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { |
| 3569 this.ctrlKeyPressed_ = flag; | 3573 this.ctrlKeyPressed_ = flag; |
| 3570 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); | 3574 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); |
| 3571 this.document_.querySelector('#drive-reload').canExecuteChange(); | 3575 this.document_.querySelector('#drive-reload').canExecuteChange(); |
| 3572 }; | 3576 }; |
| 3573 })(); | 3577 })(); |
| OLD | NEW |