| 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_OPERATION_INTERFACE_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_util_proxy.h" | 10 #include "base/file_util_proxy.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // | 218 // |
| 219 // |peer_handle| is the process handle of a pepper plugin process, which | 219 // |peer_handle| is the process handle of a pepper plugin process, which |
| 220 // is necessary for underlying IPC calls with Pepper plugins. | 220 // is necessary for underlying IPC calls with Pepper plugins. |
| 221 // | 221 // |
| 222 // This function is used only by Pepper as of writing. | 222 // This function is used only by Pepper as of writing. |
| 223 virtual void OpenFile(const GURL& path, | 223 virtual void OpenFile(const GURL& path, |
| 224 int file_flags, | 224 int file_flags, |
| 225 base::ProcessHandle peer_handle, | 225 base::ProcessHandle peer_handle, |
| 226 const OpenFileCallback& callback) = 0; | 226 const OpenFileCallback& callback) = 0; |
| 227 | 227 |
| 228 // Notifies a file at |path| opened by OpenFile is closed in plugin process. |
| 229 // File system will run some cleanup task such as uploading the modified file |
| 230 // content to a remote storage. |
| 231 // |
| 232 // This function is used only by Pepper as of writing. |
| 233 virtual void NotifyCloseFile(const GURL& path, |
| 234 const StatusCallback& callback) = 0; |
| 235 |
| 228 // For downcasting to FileSystemOperation. | 236 // For downcasting to FileSystemOperation. |
| 229 // TODO(kinuko): this hack should go away once appropriate upload-stream | 237 // TODO(kinuko): this hack should go away once appropriate upload-stream |
| 230 // handling based on element types is supported. | 238 // handling based on element types is supported. |
| 231 virtual FileSystemOperation* AsFileSystemOperation() = 0; | 239 virtual FileSystemOperation* AsFileSystemOperation() = 0; |
| 232 | 240 |
| 233 // Creates a local snapshot file for a given |path| and returns the | 241 // Creates a local snapshot file for a given |path| and returns the |
| 234 // metadata and platform path of the snapshot file via |callback|. | 242 // metadata and platform path of the snapshot file via |callback|. |
| 235 // In local filesystem cases the implementation may simply return | 243 // In local filesystem cases the implementation may simply return |
| 236 // the metadata of the file itself (as well as GetMetadata does), | 244 // the metadata of the file itself (as well as GetMetadata does), |
| 237 // while in remote filesystem case the backend may want to download the file | 245 // while in remote filesystem case the backend may want to download the file |
| (...skipping 22 matching lines...) Expand all Loading... |
| 260 kOperationTouchFile, | 268 kOperationTouchFile, |
| 261 kOperationOpenFile, | 269 kOperationOpenFile, |
| 262 kOperationGetLocalPath, | 270 kOperationGetLocalPath, |
| 263 kOperationCancel, | 271 kOperationCancel, |
| 264 }; | 272 }; |
| 265 }; | 273 }; |
| 266 | 274 |
| 267 } // namespace fileapi | 275 } // namespace fileapi |
| 268 | 276 |
| 269 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ | 277 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ |
| OLD | NEW |