| 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 24 matching lines...) Expand all Loading... |
| 35 class IsolatedContext; | 35 class IsolatedContext; |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace chrome { | 38 namespace chrome { |
| 39 | 39 |
| 40 class ExtensionGalleriesHost; | 40 class ExtensionGalleriesHost; |
| 41 class MediaGalleriesPreferences; | 41 class MediaGalleriesPreferences; |
| 42 class ScopedMediaDeviceMapEntry; | 42 class ScopedMediaDeviceMapEntry; |
| 43 | 43 |
| 44 struct MediaFileSystemInfo { | 44 struct MediaFileSystemInfo { |
| 45 string16 name; | 45 MediaFileSystemInfo(const std::string& fs_name, |
| 46 const FilePath& fs_path, |
| 47 const std::string& filesystem_id); |
| 48 MediaFileSystemInfo(); |
| 49 |
| 50 std::string name; // JSON string, must not contain slashes. |
| 51 FilePath path; |
| 46 std::string fsid; | 52 std::string fsid; |
| 47 FilePath path; | |
| 48 }; | 53 }; |
| 49 | 54 |
| 50 typedef base::Callback<void(const std::vector<MediaFileSystemInfo>&)> | 55 typedef base::Callback<void(const std::vector<MediaFileSystemInfo>&)> |
| 51 MediaFileSystemsCallback; | 56 MediaFileSystemsCallback; |
| 52 | 57 |
| 53 class MediaFileSystemRegistry | 58 class MediaFileSystemRegistry |
| 54 : public base::SystemMonitor::DevicesChangedObserver { | 59 : public base::SystemMonitor::DevicesChangedObserver { |
| 55 public: | 60 public: |
| 56 // The instance is lazily created per browser process. | 61 // The instance is lazily created per browser process. |
| 57 static MediaFileSystemRegistry* GetInstance(); | 62 static MediaFileSystemRegistry* GetInstance(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // Only accessed on the UI thread. | 130 // Only accessed on the UI thread. |
| 126 MTPDeviceDelegateMap mtp_delegate_map_; | 131 MTPDeviceDelegateMap mtp_delegate_map_; |
| 127 #endif | 132 #endif |
| 128 | 133 |
| 129 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); | 134 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); |
| 130 }; | 135 }; |
| 131 | 136 |
| 132 } // namespace chrome | 137 } // namespace chrome |
| 133 | 138 |
| 134 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 139 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
| OLD | NEW |