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 /** | 5 /** |
6 * FileManager constructor. | 6 * FileManager constructor. |
7 * | 7 * |
8 * FileManager objects encapsulate the functionality of the file selector | 8 * FileManager objects encapsulate the functionality of the file selector |
9 * dialogs, as well as the full screen file manager application (though the | 9 * dialogs, as well as the full screen file manager application (though the |
10 * latter is not yet implemented). | 10 * latter is not yet implemented). |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 CommandUtil.registerCommand(doc, 'gdata-reload', | 602 CommandUtil.registerCommand(doc, 'gdata-reload', |
603 Commands.gdataReloadCommand, this); | 603 Commands.gdataReloadCommand, this); |
604 | 604 |
605 CommandUtil.registerCommand(doc, 'gdata-go-to-drive', | 605 CommandUtil.registerCommand(doc, 'gdata-go-to-drive', |
606 Commands.gdataGoToDriveCommand, this); | 606 Commands.gdataGoToDriveCommand, this); |
607 | 607 |
608 CommandUtil.registerCommand(doc, 'paste', | 608 CommandUtil.registerCommand(doc, 'paste', |
609 Commands.pasteFileCommand, doc, this.fileTransferController_); | 609 Commands.pasteFileCommand, doc, this.fileTransferController_); |
610 | 610 |
611 CommandUtil.registerCommand(doc, 'open-with', | 611 CommandUtil.registerCommand(doc, 'open-with', |
612 Commands.openWithCommand, this); | 612 Commands.openWithCommand, this); |
| 613 |
| 614 CommandUtil.registerCommand(doc, 'zip-selection', |
| 615 Commands.zipSelectionCommand, this); |
613 | 616 |
614 CommandUtil.registerCommand(doc, 'search', Commands.searchCommand, this, | 617 CommandUtil.registerCommand(doc, 'search', Commands.searchCommand, this, |
615 this.dialogDom_.querySelector('#search-box')); | 618 this.dialogDom_.querySelector('#search-box')); |
616 | 619 |
617 CommandUtil.registerCommand(doc, 'cut', Commands.defaultCommand, doc); | 620 CommandUtil.registerCommand(doc, 'cut', Commands.defaultCommand, doc); |
618 CommandUtil.registerCommand(doc, 'copy', Commands.defaultCommand, doc); | 621 CommandUtil.registerCommand(doc, 'copy', Commands.defaultCommand, doc); |
619 | 622 |
620 var inputs = this.dialogDom_.querySelectorAll( | 623 var inputs = this.dialogDom_.querySelectorAll( |
621 'input[type=text], input[type=search], textarea'); | 624 'input[type=text], input[type=search], textarea'); |
622 | 625 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 | 755 |
753 this.filePopup_ = null; | 756 this.filePopup_ = null; |
754 | 757 |
755 this.dialogDom_.querySelector('#search-box').addEventListener( | 758 this.dialogDom_.querySelector('#search-box').addEventListener( |
756 'input', this.onSearchBoxUpdate_.bind(this)); | 759 'input', this.onSearchBoxUpdate_.bind(this)); |
757 | 760 |
758 this.defaultActionMenuItem_ = | 761 this.defaultActionMenuItem_ = |
759 this.dialogDom_.querySelector('#default-action'); | 762 this.dialogDom_.querySelector('#default-action'); |
760 | 763 |
761 this.openWithCommand_ = | 764 this.openWithCommand_ = |
762 this.dialogDom_.querySelector('#open-with'); | 765 this.dialogDom_.querySelector('#open-with'); |
763 | 766 |
764 this.defaultActionMenuItem_.addEventListener('activate', | 767 this.defaultActionMenuItem_.addEventListener('activate', |
765 this.dispatchSelectionAction_.bind(this)); | 768 this.dispatchSelectionAction_.bind(this)); |
766 | 769 |
767 this.fileTypeSelector_ = this.dialogDom_.querySelector('#file-type'); | 770 this.fileTypeSelector_ = this.dialogDom_.querySelector('#file-type'); |
768 this.initFileTypeFilter_(); | 771 this.initFileTypeFilter_(); |
769 | 772 |
770 this.updateWindowState_(); | 773 this.updateWindowState_(); |
771 // Populate the static localized strings. | 774 // Populate the static localized strings. |
772 i18nTemplate.process(this.document_, loadTimeData); | 775 i18nTemplate.process(this.document_, loadTimeData); |
(...skipping 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3393 return this.directoryModel_.getFileList(); | 3396 return this.directoryModel_.getFileList(); |
3394 }; | 3397 }; |
3395 | 3398 |
3396 /** | 3399 /** |
3397 * @return {cr.ui.List} Current list object. | 3400 * @return {cr.ui.List} Current list object. |
3398 */ | 3401 */ |
3399 FileManager.prototype.getCurrentList = function() { | 3402 FileManager.prototype.getCurrentList = function() { |
3400 return this.currentList_; | 3403 return this.currentList_; |
3401 }; | 3404 }; |
3402 })(); | 3405 })(); |
OLD | NEW |