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 #ifndef WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ |
6 #define WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ |
7 | 7 |
8 #include <vector> | |
9 | |
10 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
11 #include "webkit/fileapi/file_system_mount_point_provider.h" | 9 #include "webkit/fileapi/file_system_mount_point_provider.h" |
| 10 #include "webkit/fileapi/media/media_file_system_config.h" |
12 | 11 |
13 namespace fileapi { | 12 namespace fileapi { |
14 | 13 |
15 class DraggedFileUtil; | 14 class DraggedFileUtil; |
16 class IsolatedContext; | 15 class IsolatedContext; |
17 class IsolatedFileUtil; | 16 class IsolatedFileUtil; |
18 class MediaPathFilter; | 17 class MediaPathFilter; |
19 class NativeMediaFileUtil; | 18 class NativeMediaFileUtil; |
20 | 19 |
| 20 #if defined(SUPPORT_MEDIA_FILESYSTEM) |
| 21 class DeviceMediaFileUtil; |
| 22 #endif |
| 23 |
21 class IsolatedMountPointProvider : public FileSystemMountPointProvider { | 24 class IsolatedMountPointProvider : public FileSystemMountPointProvider { |
22 public: | 25 public: |
23 using FileSystemMountPointProvider::ValidateFileSystemCallback; | 26 using FileSystemMountPointProvider::ValidateFileSystemCallback; |
24 using FileSystemMountPointProvider::DeleteFileSystemCallback; | 27 using FileSystemMountPointProvider::DeleteFileSystemCallback; |
25 | 28 |
26 IsolatedMountPointProvider(); | 29 explicit IsolatedMountPointProvider(const FilePath& profile_path); |
27 virtual ~IsolatedMountPointProvider(); | 30 virtual ~IsolatedMountPointProvider(); |
28 | 31 |
29 // FileSystemMountPointProvider implementation. | 32 // FileSystemMountPointProvider implementation. |
30 virtual void ValidateFileSystemRoot( | 33 virtual void ValidateFileSystemRoot( |
31 const GURL& origin_url, | 34 const GURL& origin_url, |
32 FileSystemType type, | 35 FileSystemType type, |
33 bool create, | 36 bool create, |
34 const ValidateFileSystemCallback& callback) OVERRIDE; | 37 const ValidateFileSystemCallback& callback) OVERRIDE; |
35 virtual FilePath GetFileSystemRootPathOnFileThread( | 38 virtual FilePath GetFileSystemRootPathOnFileThread( |
36 const GURL& origin_url, | 39 const GURL& origin_url, |
(...skipping 19 matching lines...) Expand all Loading... |
56 int64 offset, | 59 int64 offset, |
57 FileSystemContext* context) const OVERRIDE; | 60 FileSystemContext* context) const OVERRIDE; |
58 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 61 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; |
59 virtual void DeleteFileSystem( | 62 virtual void DeleteFileSystem( |
60 const GURL& origin_url, | 63 const GURL& origin_url, |
61 FileSystemType type, | 64 FileSystemType type, |
62 FileSystemContext* context, | 65 FileSystemContext* context, |
63 const DeleteFileSystemCallback& callback) OVERRIDE; | 66 const DeleteFileSystemCallback& callback) OVERRIDE; |
64 | 67 |
65 private: | 68 private: |
| 69 // Store the profile path. We need this to create temporary snapshot files. |
| 70 const FilePath profile_path_; |
| 71 |
66 scoped_ptr<MediaPathFilter> media_path_filter_; | 72 scoped_ptr<MediaPathFilter> media_path_filter_; |
67 | 73 |
68 scoped_ptr<IsolatedFileUtil> isolated_file_util_; | 74 scoped_ptr<IsolatedFileUtil> isolated_file_util_; |
69 scoped_ptr<DraggedFileUtil> dragged_file_util_; | 75 scoped_ptr<DraggedFileUtil> dragged_file_util_; |
70 scoped_ptr<NativeMediaFileUtil> native_media_file_util_; | 76 scoped_ptr<NativeMediaFileUtil> native_media_file_util_; |
| 77 |
| 78 #if defined(SUPPORT_MEDIA_FILESYSTEM) |
| 79 scoped_ptr<DeviceMediaFileUtil> device_media_file_util_; |
| 80 #endif |
71 }; | 81 }; |
72 | 82 |
73 } // namespace fileapi | 83 } // namespace fileapi |
74 | 84 |
75 #endif // WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ | 85 #endif // WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ |
OLD | NEW |