| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 | 15 |
| 16 namespace itunes { | 16 namespace itunes { |
| 17 class ITunesDataProvider; | 17 class ITunesDataProvider; |
| 18 class ITunesDataProviderTest; | 18 class ITunesDataProviderTest; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace picasa { | 21 namespace picasa { |
| 22 class PicasaDataProvider; | 22 class PicasaDataProvider; |
| 23 class PicasaDataProviderTest; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace chrome { | 26 namespace chrome { |
| 26 | 27 |
| 27 // This class lives on the MediaTaskRunner thread. It has some static | 28 // This class lives on the MediaTaskRunner thread. It has some static |
| 28 // methods which are called on the UI thread. | 29 // methods which are called on the UI thread. |
| 29 // | 30 // |
| 30 // MediaTaskRunner is not guaranteed to be one thread, but it is guaranteed | 31 // MediaTaskRunner is not guaranteed to be one thread, but it is guaranteed |
| 31 // to be a series of sequential calls. See SequencedTaskRunner for details. | 32 // to be a series of sequential calls. See SequencedTaskRunner for details. |
| 32 class ImportedMediaGalleryRegistry { | 33 class ImportedMediaGalleryRegistry { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 | 45 |
| 45 // Should be called on the MediaTaskRunner thread only. | 46 // Should be called on the MediaTaskRunner thread only. |
| 46 #if defined(OS_WIN) || defined(OS_MACOSX) | 47 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 47 static picasa::PicasaDataProvider* PicasaDataProvider(); | 48 static picasa::PicasaDataProvider* PicasaDataProvider(); |
| 48 static itunes::ITunesDataProvider* ITunesDataProvider(); | 49 static itunes::ITunesDataProvider* ITunesDataProvider(); |
| 49 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 50 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 friend struct base::DefaultLazyInstanceTraits<ImportedMediaGalleryRegistry>; | 53 friend struct base::DefaultLazyInstanceTraits<ImportedMediaGalleryRegistry>; |
| 53 friend class itunes::ITunesDataProviderTest; | 54 friend class itunes::ITunesDataProviderTest; |
| 55 friend class picasa::PicasaDataProviderTest; |
| 54 | 56 |
| 55 ImportedMediaGalleryRegistry(); | 57 ImportedMediaGalleryRegistry(); |
| 56 virtual ~ImportedMediaGalleryRegistry(); | 58 virtual ~ImportedMediaGalleryRegistry(); |
| 57 | 59 |
| 58 #if defined(OS_WIN) || defined(OS_MACOSX) | 60 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 59 void RegisterPicasaFileSystem(const base::FilePath& database_path); | 61 void RegisterPicasaFileSystem(const base::FilePath& database_path); |
| 60 void RevokePicasaFileSystem(); | 62 void RevokePicasaFileSystem(); |
| 61 | 63 |
| 62 void RegisterITunesFileSystem(const base::FilePath& xml_library_path); | 64 void RegisterITunesFileSystem(const base::FilePath& xml_library_path); |
| 63 void RevokeITunesFileSystem(); | 65 void RevokeITunesFileSystem(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 75 base::FilePath itunes_xml_library_path_; | 77 base::FilePath itunes_xml_library_path_; |
| 76 #endif | 78 #endif |
| 77 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 79 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 78 | 80 |
| 79 DISALLOW_COPY_AND_ASSIGN(ImportedMediaGalleryRegistry); | 81 DISALLOW_COPY_AND_ASSIGN(ImportedMediaGalleryRegistry); |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 } // namespace chrome | 84 } // namespace chrome |
| 83 | 85 |
| 84 #endif // CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ | 86 #endif // CHROME_BROWSER_MEDIA_GALLERIES_IMPORTED_MEDIA_GALLERY_REGISTRY_H_ |
| OLD | NEW |