| 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 CommandUtil.registerCommand(doc, 'gdata-reload', | 576 CommandUtil.registerCommand(doc, 'gdata-reload', |
| 577 Commands.gdataReloadCommand, this); | 577 Commands.gdataReloadCommand, this); |
| 578 | 578 |
| 579 CommandUtil.registerCommand(doc, 'gdata-go-to-drive', | 579 CommandUtil.registerCommand(doc, 'gdata-go-to-drive', |
| 580 Commands.gdataGoToDriveCommand, this); | 580 Commands.gdataGoToDriveCommand, this); |
| 581 | 581 |
| 582 CommandUtil.registerCommand(doc, 'paste', | 582 CommandUtil.registerCommand(doc, 'paste', |
| 583 Commands.pasteFileCommand, doc, this.fileTransferController_); | 583 Commands.pasteFileCommand, doc, this.fileTransferController_); |
| 584 | 584 |
| 585 CommandUtil.registerCommand(doc, 'open-with', | 585 CommandUtil.registerCommand(doc, 'open-with', |
| 586 Commands.openWithCommand, this); | 586 Commands.openWithCommand, this); |
| 587 |
| 588 CommandUtil.registerCommand(doc, 'zip-selection', |
| 589 Commands.zipSelectionCommand, this); |
| 587 | 590 |
| 588 CommandUtil.registerCommand(doc, 'cut', Commands.defaultCommand, doc); | 591 CommandUtil.registerCommand(doc, 'cut', Commands.defaultCommand, doc); |
| 589 CommandUtil.registerCommand(doc, 'copy', Commands.defaultCommand, doc); | 592 CommandUtil.registerCommand(doc, 'copy', Commands.defaultCommand, doc); |
| 590 | 593 |
| 591 var inputs = this.dialogDom_.querySelectorAll( | 594 var inputs = this.dialogDom_.querySelectorAll( |
| 592 'input[type=text], input[type=search], textarea'); | 595 'input[type=text], input[type=search], textarea'); |
| 593 | 596 |
| 594 for (i = 0; i < inputs.length; i++) { | 597 for (i = 0; i < inputs.length; i++) { |
| 595 cr.ui.contextMenuHandler.setContextMenu(inputs[i], this.textContextMenu_); | 598 cr.ui.contextMenuHandler.setContextMenu(inputs[i], this.textContextMenu_); |
| 596 this.registerInputCommands_(inputs[i]); | 599 this.registerInputCommands_(inputs[i]); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 | 731 |
| 729 this.filePopup_ = null; | 732 this.filePopup_ = null; |
| 730 | 733 |
| 731 this.dialogDom_.querySelector('#search-box').addEventListener( | 734 this.dialogDom_.querySelector('#search-box').addEventListener( |
| 732 'input', this.onSearchBoxUpdate_.bind(this)); | 735 'input', this.onSearchBoxUpdate_.bind(this)); |
| 733 | 736 |
| 734 this.defaultActionMenuItem_ = | 737 this.defaultActionMenuItem_ = |
| 735 this.dialogDom_.querySelector('#default-action'); | 738 this.dialogDom_.querySelector('#default-action'); |
| 736 | 739 |
| 737 this.openWithCommand_ = | 740 this.openWithCommand_ = |
| 738 this.dialogDom_.querySelector('#open-with'); | 741 this.dialogDom_.querySelector('#open-with'); |
| 739 | 742 |
| 740 this.defaultActionMenuItem_.addEventListener('activate', | 743 this.defaultActionMenuItem_.addEventListener('activate', |
| 741 this.dispatchSelectionAction_.bind(this)); | 744 this.dispatchSelectionAction_.bind(this)); |
| 742 | 745 |
| 743 this.fileTypeSelector_ = this.dialogDom_.querySelector('#file-type'); | 746 this.fileTypeSelector_ = this.dialogDom_.querySelector('#file-type'); |
| 744 this.initFileTypeFilter_(); | 747 this.initFileTypeFilter_(); |
| 745 | 748 |
| 746 this.updateWindowState_(); | 749 this.updateWindowState_(); |
| 747 // Populate the static localized strings. | 750 // Populate the static localized strings. |
| 748 i18nTemplate.process(this.document_, loadTimeData); | 751 i18nTemplate.process(this.document_, loadTimeData); |
| (...skipping 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3327 return this.directoryModel_.getFileList(); | 3330 return this.directoryModel_.getFileList(); |
| 3328 }; | 3331 }; |
| 3329 | 3332 |
| 3330 /** | 3333 /** |
| 3331 * @return {cr.ui.List} Current list object. | 3334 * @return {cr.ui.List} Current list object. |
| 3332 */ | 3335 */ |
| 3333 FileManager.prototype.getCurrentList = function() { | 3336 FileManager.prototype.getCurrentList = function() { |
| 3334 return this.currentList_; | 3337 return this.currentList_; |
| 3335 }; | 3338 }; |
| 3336 })(); | 3339 })(); |
| OLD | NEW |