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 * FileManager constructor. | 8 * FileManager constructor. |
9 * | 9 * |
10 * FileManager objects encapsulate the functionality of the file selector | 10 * FileManager objects encapsulate the functionality of the file selector |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 this.table_ = dom.querySelector('.detail-table'); | 725 this.table_ = dom.querySelector('.detail-table'); |
726 this.grid_ = dom.querySelector('.thumbnail-grid'); | 726 this.grid_ = dom.querySelector('.thumbnail-grid'); |
727 this.spinner_ = dom.querySelector('#list-container > .spinner-layer'); | 727 this.spinner_ = dom.querySelector('#list-container > .spinner-layer'); |
728 this.showSpinner_(true); | 728 this.showSpinner_(true); |
729 | 729 |
730 // Check the option to hide the selecting checkboxes. | 730 // Check the option to hide the selecting checkboxes. |
731 this.table_.showCheckboxes = this.showCheckboxes_; | 731 this.table_.showCheckboxes = this.showCheckboxes_; |
732 | 732 |
733 var fullPage = this.dialogType == DialogType.FULL_PAGE; | 733 var fullPage = this.dialogType == DialogType.FULL_PAGE; |
734 FileTable.decorate(this.table_, this.metadataCache_, fullPage); | 734 FileTable.decorate(this.table_, this.metadataCache_, fullPage); |
735 FileGrid.decorate(this.grid_, this.metadataCache_); | 735 FileGrid.decorate(this.grid_, this.metadataCache_, this.volumeManager_); |
736 | 736 |
737 this.previewPanel_ = new PreviewPanel( | 737 this.previewPanel_ = new PreviewPanel( |
738 dom.querySelector('.preview-panel'), | 738 dom.querySelector('.preview-panel'), |
739 DialogType.isOpenDialog(this.dialogType) ? | 739 DialogType.isOpenDialog(this.dialogType) ? |
740 PreviewPanel.VisibilityType.ALWAYS_VISIBLE : | 740 PreviewPanel.VisibilityType.ALWAYS_VISIBLE : |
741 PreviewPanel.VisibilityType.AUTO, | 741 PreviewPanel.VisibilityType.AUTO, |
742 this.metadataCache_, | 742 this.metadataCache_, |
743 this.volumeManager_); | 743 this.volumeManager_); |
744 this.previewPanel_.addEventListener( | 744 this.previewPanel_.addEventListener( |
745 PreviewPanel.Event.VISIBILITY_CHANGE, | 745 PreviewPanel.Event.VISIBILITY_CHANGE, |
(...skipping 2912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3658 callback(this.preferences_); | 3658 callback(this.preferences_); |
3659 return; | 3659 return; |
3660 } | 3660 } |
3661 | 3661 |
3662 chrome.fileBrowserPrivate.getPreferences(function(prefs) { | 3662 chrome.fileBrowserPrivate.getPreferences(function(prefs) { |
3663 this.preferences_ = prefs; | 3663 this.preferences_ = prefs; |
3664 callback(prefs); | 3664 callback(prefs); |
3665 }.bind(this)); | 3665 }.bind(this)); |
3666 }; | 3666 }; |
3667 })(); | 3667 })(); |
OLD | NEW |