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_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_FILE_UTIL_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" | 10 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" |
11 | 11 |
12 namespace chrome { | |
13 class ImportedMediaGalleryRegistry; | 12 class ImportedMediaGalleryRegistry; |
14 } | |
15 | 13 |
16 namespace itunes { | 14 namespace itunes { |
17 | 15 |
18 class ITunesDataProvider; | 16 class ITunesDataProvider; |
19 | 17 |
20 extern const char kITunesLibraryXML[]; | 18 extern const char kITunesLibraryXML[]; |
21 extern const char kITunesMediaDir[]; | 19 extern const char kITunesMediaDir[]; |
22 extern const char kITunesMusicDir[]; | 20 extern const char kITunesMusicDir[]; |
23 extern const char kITunesAutoAddDir[]; | 21 extern const char kITunesAutoAddDir[]; |
24 | 22 |
25 class ITunesFileUtil : public chrome::NativeMediaFileUtil { | 23 class ITunesFileUtil : public NativeMediaFileUtil { |
26 public: | 24 public: |
27 explicit ITunesFileUtil(chrome::MediaPathFilter* media_path_filter); | 25 explicit ITunesFileUtil(MediaPathFilter* media_path_filter); |
28 virtual ~ITunesFileUtil(); | 26 virtual ~ITunesFileUtil(); |
29 | 27 |
30 protected: | 28 protected: |
31 // NativeMediaFileUtil overrides. | 29 // NativeMediaFileUtil overrides. |
32 virtual void GetFileInfoOnTaskRunnerThread( | 30 virtual void GetFileInfoOnTaskRunnerThread( |
33 scoped_ptr<fileapi::FileSystemOperationContext> context, | 31 scoped_ptr<fileapi::FileSystemOperationContext> context, |
34 const fileapi::FileSystemURL& url, | 32 const fileapi::FileSystemURL& url, |
35 const GetFileInfoCallback& callback) OVERRIDE; | 33 const GetFileInfoCallback& callback) OVERRIDE; |
36 virtual void ReadDirectoryOnTaskRunnerThread( | 34 virtual void ReadDirectoryOnTaskRunnerThread( |
37 scoped_ptr<fileapi::FileSystemOperationContext> context, | 35 scoped_ptr<fileapi::FileSystemOperationContext> context, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual void CreateSnapshotFileWithFreshDataProvider( | 73 virtual void CreateSnapshotFileWithFreshDataProvider( |
76 scoped_ptr<fileapi::FileSystemOperationContext> context, | 74 scoped_ptr<fileapi::FileSystemOperationContext> context, |
77 const fileapi::FileSystemURL& url, | 75 const fileapi::FileSystemURL& url, |
78 const CreateSnapshotFileCallback& callback, | 76 const CreateSnapshotFileCallback& callback, |
79 bool valid_parse); | 77 bool valid_parse); |
80 | 78 |
81 virtual ITunesDataProvider* GetDataProvider(); | 79 virtual ITunesDataProvider* GetDataProvider(); |
82 | 80 |
83 base::WeakPtrFactory<ITunesFileUtil> weak_factory_; | 81 base::WeakPtrFactory<ITunesFileUtil> weak_factory_; |
84 | 82 |
85 chrome::ImportedMediaGalleryRegistry* imported_registry_; | 83 ImportedMediaGalleryRegistry* imported_registry_; |
86 | 84 |
87 DISALLOW_COPY_AND_ASSIGN(ITunesFileUtil); | 85 DISALLOW_COPY_AND_ASSIGN(ITunesFileUtil); |
88 }; | 86 }; |
89 | 87 |
90 } // namespace itunes | 88 } // namespace itunes |
91 | 89 |
92 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_FILE_UTIL_H_ | 90 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_FILE_UTIL_H_ |
OLD | NEW |