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_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 8 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
9 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 9 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
19 #include "base/prefs/pref_change_registrar.h" | 19 #include "base/prefs/pref_change_registrar.h" |
20 #include "chrome/browser/media_galleries/media_galleries_preferences.h" | 20 #include "chrome/browser/media_galleries/media_galleries_preferences.h" |
21 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" | 21 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" |
22 #include "chrome/browser/storage_monitor/removable_storage_observer.h" | 22 #include "chrome/browser/storage_monitor/removable_storage_observer.h" |
23 | 23 |
| 24 class ExtensionGalleriesHost; |
| 25 class MediaFileSystemContext; |
| 26 class MediaGalleriesPreferences; |
24 class Profile; | 27 class Profile; |
| 28 class ScopedMTPDeviceMapEntry; |
| 29 |
25 | 30 |
26 namespace content { | 31 namespace content { |
27 class RenderViewHost; | 32 class RenderViewHost; |
28 } | 33 } |
29 | 34 |
30 namespace extensions { | 35 namespace extensions { |
31 class Extension; | 36 class Extension; |
32 } | 37 } |
33 | 38 |
34 namespace fileapi { | 39 namespace fileapi { |
35 class IsolatedContext; | 40 class IsolatedContext; |
36 } | 41 } |
37 | 42 |
38 namespace chrome { | |
39 | |
40 class ExtensionGalleriesHost; | |
41 class MediaFileSystemContext; | |
42 class MediaGalleriesPreferences; | |
43 class ScopedMTPDeviceMapEntry; | |
44 | |
45 struct MediaFileSystemInfo { | 43 struct MediaFileSystemInfo { |
46 MediaFileSystemInfo(const string16& fs_name, | 44 MediaFileSystemInfo(const string16& fs_name, |
47 const base::FilePath& fs_path, | 45 const base::FilePath& fs_path, |
48 const std::string& filesystem_id, | 46 const std::string& filesystem_id, |
49 MediaGalleryPrefId pref_id, | 47 MediaGalleryPrefId pref_id, |
50 const std::string& transient_device_id, | 48 const std::string& transient_device_id, |
51 bool removable, | 49 bool removable, |
52 bool media_device); | 50 bool media_device); |
53 MediaFileSystemInfo(); | 51 MediaFileSystemInfo(); |
54 ~MediaFileSystemInfo(); | 52 ~MediaFileSystemInfo(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 PrefChangeRegistrarMap pref_change_registrar_map_; | 127 PrefChangeRegistrarMap pref_change_registrar_map_; |
130 | 128 |
131 // Only accessed on the UI thread. | 129 // Only accessed on the UI thread. |
132 MTPDeviceDelegateMap mtp_device_delegate_map_; | 130 MTPDeviceDelegateMap mtp_device_delegate_map_; |
133 | 131 |
134 scoped_ptr<MediaFileSystemContext> file_system_context_; | 132 scoped_ptr<MediaFileSystemContext> file_system_context_; |
135 | 133 |
136 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); | 134 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); |
137 }; | 135 }; |
138 | 136 |
139 } // namespace chrome | |
140 | |
141 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 137 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
OLD | NEW |