| 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 // MediaFileSystemRegistry registers pictures directories and media devices as | 5 // MediaFileSystemRegistry registers pictures directories and media devices as |
| 6 // File API filesystems and keeps track of the path to filesystem ID mappings. | 6 // File API filesystems and keeps track of the path to filesystem ID mappings. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 8 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
| 9 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 9 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 virtual void OnRemovableStorageAttached( | 84 virtual void OnRemovableStorageAttached( |
| 85 const std::string& id, | 85 const std::string& id, |
| 86 const string16& name, | 86 const string16& name, |
| 87 const FilePath::StringType& location) OVERRIDE; | 87 const FilePath::StringType& location) OVERRIDE; |
| 88 virtual void OnRemovableStorageDetached(const std::string& id) OVERRIDE; | 88 virtual void OnRemovableStorageDetached(const std::string& id) OVERRIDE; |
| 89 | 89 |
| 90 size_t GetExtensionHostCountForTests() const; | 90 size_t GetExtensionHostCountForTests() const; |
| 91 | 91 |
| 92 std::string GetTransientIdForDeviceId(const std::string& device_id) const; | 92 std::string GetTransientIdForDeviceId(const std::string& device_id) const; |
| 93 | 93 |
| 94 // Keys used in gallery names, which are JSON strings. |
| 95 static const char kDeviceIdKey[]; |
| 96 static const char kGalleryIdKey[]; |
| 97 static const char kNameKey[]; |
| 98 |
| 94 private: | 99 private: |
| 95 friend class TestMediaFileSystemContext; | 100 friend class TestMediaFileSystemContext; |
| 96 class MediaFileSystemContextImpl; | 101 class MediaFileSystemContextImpl; |
| 97 | 102 |
| 98 // Map an extension to the ExtensionGalleriesHost. | 103 // Map an extension to the ExtensionGalleriesHost. |
| 99 typedef std::map<std::string /*extension_id*/, | 104 typedef std::map<std::string /*extension_id*/, |
| 100 scoped_refptr<ExtensionGalleriesHost> > ExtensionHostMap; | 105 scoped_refptr<ExtensionGalleriesHost> > ExtensionHostMap; |
| 101 // Map a profile and extension to the ExtensionGalleriesHost. | 106 // Map a profile and extension to the ExtensionGalleriesHost. |
| 102 typedef std::map<Profile*, ExtensionHostMap> ExtensionGalleriesHostMap; | 107 typedef std::map<Profile*, ExtensionHostMap> ExtensionGalleriesHostMap; |
| 103 // Map a profile to a PrefChangeRegistrar. | 108 // Map a profile to a PrefChangeRegistrar. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 scoped_ptr<MediaFileSystemContext> file_system_context_; | 146 scoped_ptr<MediaFileSystemContext> file_system_context_; |
| 142 | 147 |
| 143 TransientDeviceIds transient_device_ids_; | 148 TransientDeviceIds transient_device_ids_; |
| 144 | 149 |
| 145 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); | 150 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); |
| 146 }; | 151 }; |
| 147 | 152 |
| 148 } // namespace chrome | 153 } // namespace chrome |
| 149 | 154 |
| 150 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 155 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
| OLD | NEW |