| 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_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class RemoteFileSystemProxyInterface; | 36 class RemoteFileSystemProxyInterface; |
| 37 | 37 |
| 38 // An interface for defining a file system backend. | 38 // An interface for defining a file system backend. |
| 39 // | 39 // |
| 40 // NOTE: when you implement a new FileSystemBackend for your own | 40 // NOTE: when you implement a new FileSystemBackend for your own |
| 41 // FileSystem module, please contact to kinuko@chromium.org. | 41 // FileSystem module, please contact to kinuko@chromium.org. |
| 42 // | 42 // |
| 43 class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemBackend { | 43 class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemBackend { |
| 44 public: | 44 public: |
| 45 // Callback for OpenFileSystem. | 45 // Callback for OpenFileSystem. |
| 46 typedef base::Callback<void(base::PlatformFileError error)> | 46 typedef base::Callback<void(const GURL& root_url, |
| 47 const std::string& name, |
| 48 base::PlatformFileError error)> |
| 47 OpenFileSystemCallback; | 49 OpenFileSystemCallback; |
| 48 virtual ~FileSystemBackend() {} | 50 virtual ~FileSystemBackend() {} |
| 49 | 51 |
| 50 // Returns true if this mount point provider can handle |type|. | 52 // Returns true if this mount point provider can handle |type|. |
| 51 // One mount point provider may be able to handle multiple filesystem types. | 53 // One mount point provider may be able to handle multiple filesystem types. |
| 52 virtual bool CanHandleType(FileSystemType type) const = 0; | 54 virtual bool CanHandleType(FileSystemType type) const = 0; |
| 53 | 55 |
| 54 // Initializes the filesystem for the given |origin_url| and |type|. | 56 // Initializes the filesystem for the given |origin_url| and |type|. |
| 55 // This verifies if it is allowed to request (or create) the filesystem | 57 // This verifies if it is allowed to request (or create) the filesystem |
| 56 // and if it can access (or create) the root directory of the mount point. | 58 // and if it can access (or create) the root directory of the mount point. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 const std::string& extension_id) = 0; | 142 const std::string& extension_id) = 0; |
| 141 // Gets virtual path by known filesystem path. Returns false when filesystem | 143 // Gets virtual path by known filesystem path. Returns false when filesystem |
| 142 // path is not exposed by this provider. | 144 // path is not exposed by this provider. |
| 143 virtual bool GetVirtualPath(const base::FilePath& file_system_path, | 145 virtual bool GetVirtualPath(const base::FilePath& file_system_path, |
| 144 base::FilePath* virtual_path) = 0; | 146 base::FilePath* virtual_path) = 0; |
| 145 }; | 147 }; |
| 146 | 148 |
| 147 } // namespace fileapi | 149 } // namespace fileapi |
| 148 | 150 |
| 149 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 151 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |