OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * Overrided metadata worker's path. | 6 * Overrided metadata worker's path. |
7 * @type {string} | 7 * @type {string} |
8 */ | 8 */ |
9 ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; | 9 ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; |
10 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; | 10 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 searchResults: null | 49 searchResults: null |
50 }; | 50 }; |
51 this.container_ = queryRequiredElement(document, '.gallery'); | 51 this.container_ = queryRequiredElement(document, '.gallery'); |
52 this.document_ = document; | 52 this.document_ = document; |
53 this.metadataCache_ = this.context_.metadataCache; | 53 this.metadataCache_ = this.context_.metadataCache; |
54 this.volumeManager_ = volumeManager; | 54 this.volumeManager_ = volumeManager; |
55 /** | 55 /** |
56 * @private {!FileSystemMetadata} | 56 * @private {!FileSystemMetadata} |
57 * @const | 57 * @const |
58 */ | 58 */ |
59 this.fileSystemMetadata_ = FileSystemMetadata.create( | 59 this.fileSystemMetadata_ = new FileSystemMetadata(volumeManager); |
60 new MetadataProviderCache(), volumeManager); | |
61 this.selectedEntry_ = null; | 60 this.selectedEntry_ = null; |
62 this.metadataCacheObserverId_ = null; | 61 this.metadataCacheObserverId_ = null; |
63 this.onExternallyUnmountedBound_ = this.onExternallyUnmounted_.bind(this); | 62 this.onExternallyUnmountedBound_ = this.onExternallyUnmounted_.bind(this); |
64 this.initialized_ = false; | 63 this.initialized_ = false; |
65 | 64 |
66 this.dataModel_ = new GalleryDataModel( | 65 this.dataModel_ = new GalleryDataModel( |
67 this.context_.metadataCache, | 66 this.context_.metadataCache, |
68 this.fileSystemMetadata_); | 67 this.fileSystemMetadata_); |
69 var downloadVolumeInfo = this.volumeManager_.getCurrentProfileVolumeInfo( | 68 var downloadVolumeInfo = this.volumeManager_.getCurrentProfileVolumeInfo( |
70 VolumeManagerCommon.VolumeType.DOWNLOADS); | 69 VolumeManagerCommon.VolumeType.DOWNLOADS); |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 initializePromise.then(reload); | 978 initializePromise.then(reload); |
980 | 979 |
981 /** | 980 /** |
982 * Enteres the debug mode. | 981 * Enteres the debug mode. |
983 */ | 982 */ |
984 window.debugMe = function() { | 983 window.debugMe = function() { |
985 initializePromise.then(function() { | 984 initializePromise.then(function() { |
986 gallery.debugMe(); | 985 gallery.debugMe(); |
987 }); | 986 }); |
988 }; | 987 }; |
OLD | NEW |