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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 // Optional list of file types. | 652 // Optional list of file types. |
653 metrics.recordEnum('Create', this.dialogType, | 653 metrics.recordEnum('Create', this.dialogType, |
654 [DialogType.SELECT_FOLDER, | 654 [DialogType.SELECT_FOLDER, |
655 DialogType.SELECT_UPLOAD_FOLDER, | 655 DialogType.SELECT_UPLOAD_FOLDER, |
656 DialogType.SELECT_SAVEAS_FILE, | 656 DialogType.SELECT_SAVEAS_FILE, |
657 DialogType.SELECT_OPEN_FILE, | 657 DialogType.SELECT_OPEN_FILE, |
658 DialogType.SELECT_OPEN_MULTI_FILE, | 658 DialogType.SELECT_OPEN_MULTI_FILE, |
659 DialogType.FULL_PAGE]); | 659 DialogType.FULL_PAGE]); |
660 | 660 |
661 // Create the metadata cache. | 661 // Create the metadata cache. |
662 this.metadataCache_ = MetadataCache.createFull(); | 662 this.metadataCache_ = MetadataCache.createFull(this.volumeManager_); |
663 | 663 |
664 // Create the root view of FileManager. | 664 // Create the root view of FileManager. |
665 this.ui_ = new FileManagerUI(this.dialogDom_, this.dialogType); | 665 this.ui_ = new FileManagerUI(this.dialogDom_, this.dialogType); |
666 this.fileTypeSelector_ = this.ui_.fileTypeSelector; | 666 this.fileTypeSelector_ = this.ui_.fileTypeSelector; |
667 this.okButton_ = this.ui_.okButton; | 667 this.okButton_ = this.ui_.okButton; |
668 this.cancelButton_ = this.ui_.cancelButton; | 668 this.cancelButton_ = this.ui_.cancelButton; |
669 | 669 |
670 // Show the window as soon as the UI pre-initialization is done. | 670 // Show the window as soon as the UI pre-initialization is done. |
671 if (this.dialogType == DialogType.FULL_PAGE && | 671 if (this.dialogType == DialogType.FULL_PAGE && |
672 !util.platform.runningInBrowser()) { | 672 !util.platform.runningInBrowser()) { |
(...skipping 2985 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 |