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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Obtain an instance of this class via GetInstance(). | 81 // Obtain an instance of this class via GetInstance(). |
82 MediaFileSystemRegistry(); | 82 MediaFileSystemRegistry(); |
83 virtual ~MediaFileSystemRegistry(); | 83 virtual ~MediaFileSystemRegistry(); |
84 | 84 |
85 // Helper functions to register / unregister listening for renderer process | 85 // Helper functions to register / unregister listening for renderer process |
86 // closed / terminiated notifications. | 86 // closed / terminiated notifications. |
87 void RegisterForRPHGoneNotifications(const content::RenderProcessHost* rph); | 87 void RegisterForRPHGoneNotifications(const content::RenderProcessHost* rph); |
88 void UnregisterForRPHGoneNotifications(const content::RenderProcessHost* rph); | 88 void UnregisterForRPHGoneNotifications(const content::RenderProcessHost* rph); |
89 | 89 |
90 // Registers a path as a media file system and return the filesystem id. | 90 // Registers a path as a media file system and return the filesystem id. |
91 std::string RegisterPathAsFileSystem( | 91 std::string RegisterPathAsFileSystem(const FilePath& path); |
92 const base::SystemMonitor::MediaDeviceType& device_type, | |
93 const FilePath& path); | |
94 | |
95 | 92 |
96 // Revoke a media file system with a given |path|. | 93 // Revoke a media file system with a given |path|. |
97 void RevokeMediaFileSystem( | 94 void RevokeMediaFileSystem(const FilePath& path); |
98 const base::SystemMonitor::MediaDeviceType& device_type, | |
99 const FilePath& path); | |
100 | 95 |
101 // Only accessed on the UI thread. | 96 // Only accessed on the UI thread. |
102 ChildIdToMediaFSMap media_fs_map_; | 97 ChildIdToMediaFSMap media_fs_map_; |
103 | 98 |
104 // Only accessed on the UI thread. | 99 // Only accessed on the UI thread. |
105 DeviceIdToInfoMap device_id_map_; | 100 DeviceIdToInfoMap device_id_map_; |
106 | 101 |
107 // Is only used on the UI thread. | 102 // Is only used on the UI thread. |
108 content::NotificationRegistrar registrar_; | 103 content::NotificationRegistrar registrar_; |
109 | 104 |
110 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); | 105 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); |
111 }; | 106 }; |
112 | 107 |
113 } // namespace chrome | 108 } // namespace chrome |
114 | 109 |
115 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 110 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
OLD | NEW |