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_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ |
7 | 7 |
| 8 #include "base/memory/weak_ptr.h" |
8 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" | 9 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" |
9 | 10 |
| 11 namespace chrome { |
| 12 class ImportedMediaGalleryRegistry; |
| 13 } |
| 14 |
10 namespace itunes { | 15 namespace itunes { |
11 | 16 |
| 17 class ITunesDataProvider; |
| 18 |
12 class ItunesFileUtil : public chrome::NativeMediaFileUtil { | 19 class ItunesFileUtil : public chrome::NativeMediaFileUtil { |
13 public: | 20 public: |
14 ItunesFileUtil(); | 21 ItunesFileUtil(); |
15 virtual ~ItunesFileUtil(); | 22 virtual ~ItunesFileUtil(); |
16 | 23 |
17 private: | 24 protected: |
18 // NativeMediaFileUtil overrides. | 25 // NativeMediaFileUtil overrides. |
| 26 virtual void GetFileInfoOnTaskRunnerThread( |
| 27 fileapi::FileSystemOperationContext* context, |
| 28 const fileapi::FileSystemURL& url, |
| 29 const GetFileInfoCallback& callback) OVERRIDE; |
| 30 virtual void ReadDirectoryOnTaskRunnerThread( |
| 31 fileapi::FileSystemOperationContext* context, |
| 32 const fileapi::FileSystemURL& url, |
| 33 const ReadDirectoryCallback& callback) OVERRIDE; |
19 virtual base::PlatformFileError GetFileInfoSync( | 34 virtual base::PlatformFileError GetFileInfoSync( |
20 fileapi::FileSystemOperationContext* context, | 35 fileapi::FileSystemOperationContext* context, |
21 const fileapi::FileSystemURL& url, | 36 const fileapi::FileSystemURL& url, |
22 base::PlatformFileInfo* file_info, | 37 base::PlatformFileInfo* file_info, |
23 base::FilePath* platform_path) OVERRIDE; | 38 base::FilePath* platform_path) OVERRIDE; |
24 virtual base::PlatformFileError ReadDirectorySync( | 39 virtual base::PlatformFileError ReadDirectorySync( |
25 fileapi::FileSystemOperationContext* context, | 40 fileapi::FileSystemOperationContext* context, |
26 const fileapi::FileSystemURL& url, | 41 const fileapi::FileSystemURL& url, |
27 EntryList* file_list) OVERRIDE; | 42 EntryList* file_list) OVERRIDE; |
28 virtual base::PlatformFileError GetLocalFilePath( | 43 virtual base::PlatformFileError GetLocalFilePath( |
29 fileapi::FileSystemOperationContext* context, | 44 fileapi::FileSystemOperationContext* context, |
30 const fileapi::FileSystemURL& url, | 45 const fileapi::FileSystemURL& url, |
31 base::FilePath* local_file_path) OVERRIDE; | 46 base::FilePath* local_file_path) OVERRIDE; |
32 | 47 |
33 private: | 48 private: |
| 49 void GetFileInfoWithFreshDataProvider( |
| 50 fileapi::FileSystemOperationContext* context, |
| 51 const fileapi::FileSystemURL& url, |
| 52 const GetFileInfoCallback& callback); |
| 53 void ReadDirectoryWithFreshDataProvider( |
| 54 fileapi::FileSystemOperationContext* context, |
| 55 const fileapi::FileSystemURL& url, |
| 56 const ReadDirectoryCallback& callback); |
| 57 |
| 58 ITunesDataProvider* GetDataProvider(); |
| 59 |
| 60 base::WeakPtrFactory<ItunesFileUtil> weak_factory_; |
| 61 |
| 62 chrome::ImportedMediaGalleryRegistry* imported_registry_; |
| 63 |
34 DISALLOW_COPY_AND_ASSIGN(ItunesFileUtil); | 64 DISALLOW_COPY_AND_ASSIGN(ItunesFileUtil); |
35 }; | 65 }; |
36 | 66 |
37 } // namespace itunes | 67 } // namespace itunes |
38 | 68 |
39 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ | 69 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ |
40 | 70 |
OLD | NEW |