| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 472         this.directoryModel_, | 472         this.directoryModel_, | 
| 473         this.commandHandler); | 473         this.commandHandler); | 
| 474     this.toolbarController_ = new ToolbarController( | 474     this.toolbarController_ = new ToolbarController( | 
| 475         this.ui_.toolbar, | 475         this.ui_.toolbar, | 
| 476         this.ui_.dialogNavigationList, | 476         this.ui_.dialogNavigationList, | 
| 477         this.ui_.listContainer, | 477         this.ui_.listContainer, | 
| 478         assert(this.ui_.locationLine), | 478         assert(this.ui_.locationLine), | 
| 479         this.selectionHandler_, | 479         this.selectionHandler_, | 
| 480         this.directoryModel_); | 480         this.directoryModel_); | 
| 481     this.tooltipController_ = new TooltipController( | 481     this.tooltipController_ = new TooltipController( | 
| 482         queryRequiredElement(this.dialogDom_, '#tooltip'), | 482         queryRequiredElement('#tooltip', this.dialogDom_), | 
| 483         Array.prototype.slice.call( | 483         Array.prototype.slice.call( | 
| 484             this.dialogDom_.querySelectorAll('[has-tooltip]'))); | 484             this.dialogDom_.querySelectorAll('[has-tooltip]'))); | 
| 485     this.emptyFolderController_ = new EmptyFolderController( | 485     this.emptyFolderController_ = new EmptyFolderController( | 
| 486         this.ui_.emptyFolder, | 486         this.ui_.emptyFolder, | 
| 487         this.directoryModel_); | 487         this.directoryModel_); | 
| 488 | 488 | 
| 489     if (this.dialogType === DialogType.FULL_PAGE) { | 489     if (this.dialogType === DialogType.FULL_PAGE) { | 
| 490       importer.importEnabled().then( | 490       importer.importEnabled().then( | 
| 491           function(enabled) { | 491           function(enabled) { | 
| 492             if (enabled) { | 492             if (enabled) { | 
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 779     assert(this.dialogDom_); | 779     assert(this.dialogDom_); | 
| 780     assert(this.metadataModel_); | 780     assert(this.metadataModel_); | 
| 781 | 781 | 
| 782     // Cache nodes we'll be manipulating. | 782     // Cache nodes we'll be manipulating. | 
| 783     var dom = this.dialogDom_; | 783     var dom = this.dialogDom_; | 
| 784     assert(dom); | 784     assert(dom); | 
| 785 | 785 | 
| 786     // Initialize the dialog. | 786     // Initialize the dialog. | 
| 787     FileManagerDialogBase.setFileManager(this); | 787     FileManagerDialogBase.setFileManager(this); | 
| 788 | 788 | 
| 789     var table = queryRequiredElement(dom, '.detail-table'); | 789     var table = queryRequiredElement('.detail-table', dom); | 
| 790     FileTable.decorate( | 790     FileTable.decorate( | 
| 791         table, | 791         table, | 
| 792         this.metadataModel_, | 792         this.metadataModel_, | 
| 793         this.volumeManager_, | 793         this.volumeManager_, | 
| 794         this.historyLoader_, | 794         this.historyLoader_, | 
| 795         this.dialogType == DialogType.FULL_PAGE); | 795         this.dialogType == DialogType.FULL_PAGE); | 
| 796     var grid = queryRequiredElement(dom, '.thumbnail-grid'); | 796     var grid = queryRequiredElement('.thumbnail-grid', dom); | 
| 797     FileGrid.decorate( | 797     FileGrid.decorate( | 
| 798         grid, | 798         grid, | 
| 799         this.metadataModel_, | 799         this.metadataModel_, | 
| 800         this.volumeManager_, | 800         this.volumeManager_, | 
| 801         this.historyLoader_); | 801         this.historyLoader_); | 
| 802 | 802 | 
| 803     this.addHistoryObserver_(); | 803     this.addHistoryObserver_(); | 
| 804 | 804 | 
| 805     this.ui_.initAdditionalUI( | 805     this.ui_.initAdditionalUI( | 
| 806         assertInstanceof(table, FileTable), | 806         assertInstanceof(table, FileTable), | 
| 807         assertInstanceof(grid, FileGrid), | 807         assertInstanceof(grid, FileGrid), | 
| 808         new LocationLine( | 808         new LocationLine( | 
| 809             queryRequiredElement(dom, '#location-breadcrumbs'), | 809             queryRequiredElement('#location-breadcrumbs', dom), | 
| 810             this.volumeManager_)); | 810             this.volumeManager_)); | 
| 811 | 811 | 
| 812     // Handle UI events. | 812     // Handle UI events. | 
| 813     this.backgroundPage_.background.progressCenter.addPanel( | 813     this.backgroundPage_.background.progressCenter.addPanel( | 
| 814         this.ui_.progressCenterPanel); | 814         this.ui_.progressCenterPanel); | 
| 815 | 815 | 
| 816     util.addIsFocusedMethod(); | 816     util.addIsFocusedMethod(); | 
| 817 | 817 | 
| 818     // Populate the static localized strings. | 818     // Populate the static localized strings. | 
| 819     i18nTemplate.process(this.document_, loadTimeData); | 819     i18nTemplate.process(this.document_, loadTimeData); | 
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1364   FileManager.prototype.debugMe = function() { | 1364   FileManager.prototype.debugMe = function() { | 
| 1365     var out = 'Debug information.\n'; | 1365     var out = 'Debug information.\n'; | 
| 1366 | 1366 | 
| 1367     out += '1. VolumeManagerWrapper\n' + | 1367     out += '1. VolumeManagerWrapper\n' + | 
| 1368         this.volumeManager_.toString() + '\n'; | 1368         this.volumeManager_.toString() + '\n'; | 
| 1369 | 1369 | 
| 1370     out += 'End of debug information.'; | 1370     out += 'End of debug information.'; | 
| 1371     console.log(out); | 1371     console.log(out); | 
| 1372   }; | 1372   }; | 
| 1373 })(); | 1373 })(); | 
| OLD | NEW | 
|---|