| 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_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
| 14 #include "webkit/fileapi/fileapi_export.h" | 14 #include "webkit/fileapi/fileapi_export.h" |
| 15 #include "webkit/fileapi/file_system_types.h" | 15 #include "webkit/fileapi/file_system_types.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 | 18 |
| 19 namespace webkit_blob { | 19 namespace webkit_blob { |
| 20 class FileReader; | 20 class FileStreamReader; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace fileapi { | 23 namespace fileapi { |
| 24 | 24 |
| 25 class FileSystemContext; | 25 class FileSystemContext; |
| 26 class FileSystemFileUtil; | 26 class FileSystemFileUtil; |
| 27 class FileSystemOperationInterface; | 27 class FileSystemOperationInterface; |
| 28 class FileSystemQuotaUtil; | 28 class FileSystemQuotaUtil; |
| 29 class FileWriter; | 29 class FileWriter; |
| 30 class RemoteFileSystemProxyInterface; | 30 class RemoteFileSystemProxyInterface; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // mount point based on the given triplet of |origin_url|, |file_system_type| | 85 // mount point based on the given triplet of |origin_url|, |file_system_type| |
| 86 // and |virtual_path|. | 86 // and |virtual_path|. |
| 87 // This method is usually dispatched by | 87 // This method is usually dispatched by |
| 88 // FileSystemContext::CreateFileSystemOperation. | 88 // FileSystemContext::CreateFileSystemOperation. |
| 89 virtual FileSystemOperationInterface* CreateFileSystemOperation( | 89 virtual FileSystemOperationInterface* CreateFileSystemOperation( |
| 90 const GURL& origin_url, | 90 const GURL& origin_url, |
| 91 FileSystemType file_system_type, | 91 FileSystemType file_system_type, |
| 92 const FilePath& virtual_path, | 92 const FilePath& virtual_path, |
| 93 FileSystemContext* context) const = 0; | 93 FileSystemContext* context) const = 0; |
| 94 | 94 |
| 95 // Creates a new file reader for a given filesystem URL |url| with a offset | 95 // Creates a new file stream reader for a given filesystem URL |url| with an |
| 96 // |offset|. | 96 // offset |offset|. |
| 97 // The returned object must be owned and managed by the caller. | 97 // The returned object must be owned and managed by the caller. |
| 98 // This method itself does *not* check if the given path exists and is a | 98 // This method itself does *not* check if the given path exists and is a |
| 99 // regular file. | 99 // regular file. |
| 100 virtual webkit_blob::FileReader* CreateFileReader( | 100 virtual webkit_blob::FileStreamReader* CreateFileStreamReader( |
| 101 const GURL& url, | 101 const GURL& url, |
| 102 int64 offset, | 102 int64 offset, |
| 103 FileSystemContext* context) const = 0; | 103 FileSystemContext* context) const = 0; |
| 104 | 104 |
| 105 // Creates a new file writer for a given filesystem URL |url| with a offset | 105 // Creates a new file writer for a given filesystem URL |url| with a offset |
| 106 // |offset|. | 106 // |offset|. |
| 107 // The returned object must be owned and managed by the caller. | 107 // The returned object must be owned and managed by the caller. |
| 108 // This method itself does *not* check if the given path exists and is a | 108 // This method itself does *not* check if the given path exists and is a |
| 109 // regular file. | 109 // regular file. |
| 110 virtual FileWriter* CreateFileWriter( | 110 virtual FileWriter* CreateFileWriter( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 virtual void RemoveMountPoint(const FilePath& mount_point) = 0; | 143 virtual void RemoveMountPoint(const FilePath& mount_point) = 0; |
| 144 // Gets virtual path by known filesystem path. Returns false when filesystem | 144 // Gets virtual path by known filesystem path. Returns false when filesystem |
| 145 // path is not exposed by this provider. | 145 // path is not exposed by this provider. |
| 146 virtual bool GetVirtualPath(const FilePath& file_system_path, | 146 virtual bool GetVirtualPath(const FilePath& file_system_path, |
| 147 FilePath* virtual_path) = 0; | 147 FilePath* virtual_path) = 0; |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace fileapi | 150 } // namespace fileapi |
| 151 | 151 |
| 152 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ | 152 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ |
| OLD | NEW |