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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 | 617 |
618 CommandUtil.registerCommand(doc, 'change-default-app', | 618 CommandUtil.registerCommand(doc, 'change-default-app', |
619 Commands.changeDefaultAppCommand, this); | 619 Commands.changeDefaultAppCommand, this); |
620 | 620 |
621 if (!util.platform.newUI()) { | 621 if (!util.platform.newUI()) { |
622 CommandUtil.registerCommand(this.directoryTree_, 'unmount', | 622 CommandUtil.registerCommand(this.directoryTree_, 'unmount', |
623 Commands.unmountCommand, this.directoryTree_, this); | 623 Commands.unmountCommand, this.directoryTree_, this); |
624 | 624 |
625 CommandUtil.registerCommand(this.directoryTree_, 'import-photos', | 625 CommandUtil.registerCommand(this.directoryTree_, 'import-photos', |
626 Commands.importCommand, this.directoryTree_); | 626 Commands.importCommand, this.directoryTree_); |
| 627 |
| 628 CommandUtil.registerCommand(doc, 'format', |
| 629 Commands.formatCommand, this.directoryTree_, this, |
| 630 this.directoryModel_); |
627 } else { | 631 } else { |
628 CommandUtil.registerCommand(this.volumeList_, 'unmount', | 632 CommandUtil.registerCommand(this.volumeList_, 'unmount', |
629 Commands.unmountCommand, this.volumeList_, this); | 633 Commands.unmountCommand, this.volumeList_, this); |
630 | 634 |
631 CommandUtil.registerCommand(this.volumeList_, 'import-photos', | 635 CommandUtil.registerCommand(this.volumeList_, 'import-photos', |
632 Commands.importCommand, this.volumeList_); | 636 Commands.importCommand, this.volumeList_); |
| 637 |
| 638 CommandUtil.registerCommand(doc, 'format', |
| 639 Commands.formatCommand, this.volumeList_, this, |
| 640 this.directoryModel_); |
633 } | 641 } |
634 | 642 |
635 CommandUtil.registerCommand(doc, 'format', | |
636 Commands.formatCommand, this.directoryTree_, this, | |
637 this.directoryModel_); | |
638 | |
639 CommandUtil.registerCommand(doc, 'delete', | 643 CommandUtil.registerCommand(doc, 'delete', |
640 Commands.deleteFileCommand, this); | 644 Commands.deleteFileCommand, this); |
641 | 645 |
642 CommandUtil.registerCommand(doc, 'rename', | 646 CommandUtil.registerCommand(doc, 'rename', |
643 Commands.renameFileCommand, this); | 647 Commands.renameFileCommand, this); |
644 | 648 |
645 CommandUtil.registerCommand(doc, 'volume-help', | 649 CommandUtil.registerCommand(doc, 'volume-help', |
646 Commands.volumeHelpCommand, this); | 650 Commands.volumeHelpCommand, this); |
647 | 651 |
648 CommandUtil.registerCommand(doc, 'drive-buy-more-space', | 652 CommandUtil.registerCommand(doc, 'drive-buy-more-space', |
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3641 * Set the flag expressing whether the ctrl key is pressed or not. | 3645 * Set the flag expressing whether the ctrl key is pressed or not. |
3642 * @param {boolean} flag New value of the flag | 3646 * @param {boolean} flag New value of the flag |
3643 * @private | 3647 * @private |
3644 */ | 3648 */ |
3645 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { | 3649 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { |
3646 this.ctrlKeyPressed_ = flag; | 3650 this.ctrlKeyPressed_ = flag; |
3647 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); | 3651 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); |
3648 this.document_.querySelector('#drive-reload').canExecuteChange(); | 3652 this.document_.querySelector('#drive-reload').canExecuteChange(); |
3649 }; | 3653 }; |
3650 })(); | 3654 })(); |
OLD | NEW |