| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // The instance is lazily created per browser process. | 41 // The instance is lazily created per browser process. |
| 42 static MediaFileSystemRegistry* GetInstance(); | 42 static MediaFileSystemRegistry* GetInstance(); |
| 43 | 43 |
| 44 // Returns the list of media filesystem IDs and paths for a given RPH. | 44 // Returns the list of media filesystem IDs and paths for a given RPH. |
| 45 // Called on the UI thread. | 45 // Called on the UI thread. |
| 46 std::vector<MediaFSIDAndPath> GetMediaFileSystems( | 46 std::vector<MediaFSIDAndPath> GetMediaFileSystems( |
| 47 const content::RenderProcessHost* rph); | 47 const content::RenderProcessHost* rph); |
| 48 | 48 |
| 49 // base::SystemMonitor::DevicesChangedObserver implementation. | 49 // base::SystemMonitor::DevicesChangedObserver implementation. |
| 50 virtual void OnMediaDeviceDetached(const std::string& id) OVERRIDE; | 50 virtual void OnMediaDeviceDetached( |
| 51 const std::string& id, |
| 52 const FilePath::StringType& location) OVERRIDE; |
| 51 | 53 |
| 52 // content::NotificationObserver implementation. | 54 // content::NotificationObserver implementation. |
| 53 virtual void Observe(int type, | 55 virtual void Observe(int type, |
| 54 const content::NotificationSource& source, | 56 const content::NotificationSource& source, |
| 55 const content::NotificationDetails& details) OVERRIDE; | 57 const content::NotificationDetails& details) OVERRIDE; |
| 56 | 58 |
| 57 private: | 59 private: |
| 58 friend struct base::DefaultLazyInstanceTraits<MediaFileSystemRegistry>; | 60 friend struct base::DefaultLazyInstanceTraits<MediaFileSystemRegistry>; |
| 59 | 61 |
| 60 // Mapping of media directories to filesystem IDs. | 62 // Mapping of media directories to filesystem IDs. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 90 | 92 |
| 91 // Is only used on the UI thread. | 93 // Is only used on the UI thread. |
| 92 content::NotificationRegistrar registrar_; | 94 content::NotificationRegistrar registrar_; |
| 93 | 95 |
| 94 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); | 96 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); |
| 95 }; | 97 }; |
| 96 | 98 |
| 97 } // namespace chrome | 99 } // namespace chrome |
| 98 | 100 |
| 99 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ | 101 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ |
| OLD | NEW |