OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MEDIA_FILE_SYSTEM_MOUNT_POINT_PRO
VIDER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_MOUNT_POINT_PRO
VIDER_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_MOUNT_POINT_PRO
VIDER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_MOUNT_POINT_PRO
VIDER_H_ |
7 | 7 |
| 8 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
9 #include "webkit/browser/fileapi/file_system_mount_point_provider.h" | 10 #include "webkit/browser/fileapi/file_system_mount_point_provider.h" |
10 | 11 |
| 12 namespace base { |
| 13 class SequencedTaskRunner; |
| 14 } |
| 15 |
11 namespace fileapi { | 16 namespace fileapi { |
12 class AsyncFileUtilAdapter; | 17 class AsyncFileUtilAdapter; |
13 } | 18 } |
14 | 19 |
15 namespace chrome { | 20 namespace chrome { |
16 | 21 |
17 class MediaPathFilter; | 22 class MediaPathFilter; |
18 | 23 |
19 class DeviceMediaAsyncFileUtil; | 24 class DeviceMediaAsyncFileUtil; |
20 | 25 |
21 class MediaFileSystemMountPointProvider | 26 class MediaFileSystemMountPointProvider |
22 : public fileapi::FileSystemMountPointProvider { | 27 : public fileapi::FileSystemMountPointProvider { |
23 public: | 28 public: |
| 29 static const char kMediaTaskRunnerName[]; |
24 static const char kMediaPathFilterKey[]; | 30 static const char kMediaPathFilterKey[]; |
25 static const char kMTPDeviceDelegateURLKey[]; | 31 static const char kMTPDeviceDelegateURLKey[]; |
26 | 32 |
27 explicit MediaFileSystemMountPointProvider( | 33 MediaFileSystemMountPointProvider( |
28 const base::FilePath& profile_path); | 34 const base::FilePath& profile_path, |
| 35 base::SequencedTaskRunner* media_task_runner); |
29 virtual ~MediaFileSystemMountPointProvider(); | 36 virtual ~MediaFileSystemMountPointProvider(); |
30 | 37 |
31 // FileSystemMountPointProvider implementation. | 38 // FileSystemMountPointProvider implementation. |
32 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE; | 39 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE; |
33 virtual void OpenFileSystem( | 40 virtual void OpenFileSystem( |
34 const GURL& origin_url, | 41 const GURL& origin_url, |
35 fileapi::FileSystemType type, | 42 fileapi::FileSystemType type, |
36 fileapi::OpenFileSystemMode mode, | 43 fileapi::OpenFileSystemMode mode, |
37 const OpenFileSystemCallback& callback) OVERRIDE; | 44 const OpenFileSystemCallback& callback) OVERRIDE; |
38 virtual fileapi::FileSystemFileUtil* GetFileUtil( | 45 virtual fileapi::FileSystemFileUtil* GetFileUtil( |
(...skipping 23 matching lines...) Expand all Loading... |
62 virtual void DeleteFileSystem( | 69 virtual void DeleteFileSystem( |
63 const GURL& origin_url, | 70 const GURL& origin_url, |
64 fileapi::FileSystemType type, | 71 fileapi::FileSystemType type, |
65 fileapi::FileSystemContext* context, | 72 fileapi::FileSystemContext* context, |
66 const DeleteFileSystemCallback& callback) OVERRIDE; | 73 const DeleteFileSystemCallback& callback) OVERRIDE; |
67 | 74 |
68 private: | 75 private: |
69 // Store the profile path. We need this to create temporary snapshot files. | 76 // Store the profile path. We need this to create temporary snapshot files. |
70 const base::FilePath profile_path_; | 77 const base::FilePath profile_path_; |
71 | 78 |
| 79 scoped_refptr<base::SequencedTaskRunner> media_task_runner_; |
| 80 |
72 scoped_ptr<MediaPathFilter> media_path_filter_; | 81 scoped_ptr<MediaPathFilter> media_path_filter_; |
73 scoped_ptr<fileapi::CopyOrMoveFileValidatorFactory> | 82 scoped_ptr<fileapi::CopyOrMoveFileValidatorFactory> |
74 media_copy_or_move_file_validator_factory_; | 83 media_copy_or_move_file_validator_factory_; |
75 | 84 |
76 scoped_ptr<fileapi::AsyncFileUtil> native_media_file_util_; | 85 scoped_ptr<fileapi::AsyncFileUtil> native_media_file_util_; |
77 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; | 86 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; |
78 scoped_ptr<fileapi::AsyncFileUtil> picasa_file_util_; | 87 scoped_ptr<fileapi::AsyncFileUtil> picasa_file_util_; |
79 scoped_ptr<fileapi::AsyncFileUtil> itunes_file_util_; | 88 scoped_ptr<fileapi::AsyncFileUtil> itunes_file_util_; |
80 | 89 |
81 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemMountPointProvider); | 90 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemMountPointProvider); |
82 }; | 91 }; |
83 | 92 |
84 } // namespace chrome | 93 } // namespace chrome |
85 | 94 |
86 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_MOUNT_POINT_
PROVIDER_H_ | 95 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_MOUNT_POINT_
PROVIDER_H_ |
OLD | NEW |