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> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "webkit/fileapi/file_system_mount_point_provider.h" | 11 #include "webkit/fileapi/file_system_mount_point_provider.h" |
12 | 12 |
13 namespace fileapi { | 13 namespace fileapi { |
14 | 14 |
| 15 class DraggedFileUtil; |
15 class IsolatedContext; | 16 class IsolatedContext; |
16 class IsolatedFileUtil; | 17 class IsolatedFileUtil; |
17 | 18 |
18 class IsolatedMountPointProvider : public FileSystemMountPointProvider { | 19 class IsolatedMountPointProvider : public FileSystemMountPointProvider { |
19 public: | 20 public: |
20 typedef FileSystemMountPointProvider::ValidateFileSystemCallback | 21 typedef FileSystemMountPointProvider::ValidateFileSystemCallback |
21 ValidateFileSystemCallback; | 22 ValidateFileSystemCallback; |
22 | 23 |
23 IsolatedMountPointProvider(); | 24 IsolatedMountPointProvider(); |
24 virtual ~IsolatedMountPointProvider(); | 25 virtual ~IsolatedMountPointProvider(); |
25 | 26 |
26 // FileSystemMountPointProvider implementation. | 27 // FileSystemMountPointProvider implementation. |
27 virtual void ValidateFileSystemRoot( | 28 virtual void ValidateFileSystemRoot( |
28 const GURL& origin_url, | 29 const GURL& origin_url, |
29 FileSystemType type, | 30 FileSystemType type, |
30 bool create, | 31 bool create, |
31 const ValidateFileSystemCallback& callback) OVERRIDE; | 32 const ValidateFileSystemCallback& callback) OVERRIDE; |
32 virtual FilePath GetFileSystemRootPathOnFileThread( | 33 virtual FilePath GetFileSystemRootPathOnFileThread( |
33 const GURL& origin_url, | 34 const GURL& origin_url, |
34 FileSystemType type, | 35 FileSystemType type, |
35 const FilePath& virtual_path, | 36 const FilePath& virtual_path, |
36 bool create) OVERRIDE; | 37 bool create) OVERRIDE; |
37 virtual bool IsAccessAllowed(const GURL& origin_url, | 38 virtual bool IsAccessAllowed(const GURL& origin_url, |
38 FileSystemType type, | 39 FileSystemType type, |
39 const FilePath& virtual_path) OVERRIDE; | 40 const FilePath& virtual_path) OVERRIDE; |
40 virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE; | 41 virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE; |
41 virtual FileSystemFileUtil* GetFileUtil() OVERRIDE; | 42 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE; |
42 virtual FilePath GetPathForPermissionsCheck(const FilePath& virtual_path) | 43 virtual FilePath GetPathForPermissionsCheck(const FilePath& virtual_path) |
43 const OVERRIDE; | 44 const OVERRIDE; |
44 virtual FileSystemOperationInterface* CreateFileSystemOperation( | 45 virtual FileSystemOperationInterface* CreateFileSystemOperation( |
45 const FileSystemURL& url, | 46 const FileSystemURL& url, |
46 FileSystemContext* context) const OVERRIDE; | 47 FileSystemContext* context) const OVERRIDE; |
47 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( | 48 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( |
48 const FileSystemURL& url, | 49 const FileSystemURL& url, |
49 int64 offset, | 50 int64 offset, |
50 FileSystemContext* context) const OVERRIDE; | 51 FileSystemContext* context) const OVERRIDE; |
51 virtual FileStreamWriter* CreateFileStreamWriter( | 52 virtual FileStreamWriter* CreateFileStreamWriter( |
52 const FileSystemURL& url, | 53 const FileSystemURL& url, |
53 int64 offset, | 54 int64 offset, |
54 FileSystemContext* context) const OVERRIDE; | 55 FileSystemContext* context) const OVERRIDE; |
55 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 56 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; |
56 | 57 |
57 private: | 58 private: |
58 scoped_ptr<IsolatedFileUtil> isolated_file_util_; | 59 scoped_ptr<IsolatedFileUtil> isolated_file_util_; |
| 60 scoped_ptr<DraggedFileUtil> dragged_file_util_; |
59 }; | 61 }; |
60 | 62 |
61 } // namespace fileapi | 63 } // namespace fileapi |
62 | 64 |
63 #endif // WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ | 65 #endif // WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ |
OLD | NEW |