| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // | 219 // |
| 220 // |peer_handle| is the process handle of a pepper plugin process, which | 220 // |peer_handle| is the process handle of a pepper plugin process, which |
| 221 // is necessary for underlying IPC calls with Pepper plugins. | 221 // is necessary for underlying IPC calls with Pepper plugins. |
| 222 // | 222 // |
| 223 // This function is used only by Pepper as of writing. | 223 // This function is used only by Pepper as of writing. |
| 224 virtual void OpenFile(const FileSystemURL& path, | 224 virtual void OpenFile(const FileSystemURL& path, |
| 225 int file_flags, | 225 int file_flags, |
| 226 base::ProcessHandle peer_handle, | 226 base::ProcessHandle peer_handle, |
| 227 const OpenFileCallback& callback) = 0; | 227 const OpenFileCallback& callback) = 0; |
| 228 | 228 |
| 229 // Notifies a file at |path| opened by OpenFile is closed in plugin process. |
| 230 // File system will run some cleanup task such as uploading the modified file |
| 231 // content to a remote storage. |
| 232 // |
| 233 // This function is used only by Pepper as of writing. |
| 234 virtual void NotifyCloseFile(const FileSystemURL& path) = 0; |
| 235 |
| 229 // For downcasting to FileSystemOperation. | 236 // For downcasting to FileSystemOperation. |
| 230 // TODO(kinuko): this hack should go away once appropriate upload-stream | 237 // TODO(kinuko): this hack should go away once appropriate upload-stream |
| 231 // handling based on element types is supported. | 238 // handling based on element types is supported. |
| 232 virtual FileSystemOperation* AsFileSystemOperation() = 0; | 239 virtual FileSystemOperation* AsFileSystemOperation() = 0; |
| 233 | 240 |
| 234 // 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 |
| 235 // metadata and platform path of the snapshot file via |callback|. | 242 // metadata and platform path of the snapshot file via |callback|. |
| 236 // In local filesystem cases the implementation may simply return | 243 // In local filesystem cases the implementation may simply return |
| 237 // the metadata of the file itself (as well as GetMetadata does), | 244 // the metadata of the file itself (as well as GetMetadata does), |
| 238 // 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 14 matching lines...) Expand all Loading... |
| 253 kOperationMove, | 260 kOperationMove, |
| 254 kOperationDirectoryExists, | 261 kOperationDirectoryExists, |
| 255 kOperationFileExists, | 262 kOperationFileExists, |
| 256 kOperationGetMetadata, | 263 kOperationGetMetadata, |
| 257 kOperationReadDirectory, | 264 kOperationReadDirectory, |
| 258 kOperationRemove, | 265 kOperationRemove, |
| 259 kOperationWrite, | 266 kOperationWrite, |
| 260 kOperationTruncate, | 267 kOperationTruncate, |
| 261 kOperationTouchFile, | 268 kOperationTouchFile, |
| 262 kOperationOpenFile, | 269 kOperationOpenFile, |
| 270 kOperationCloseFile, |
| 263 kOperationGetLocalPath, | 271 kOperationGetLocalPath, |
| 264 kOperationCancel, | 272 kOperationCancel, |
| 265 }; | 273 }; |
| 266 }; | 274 }; |
| 267 | 275 |
| 268 } // namespace fileapi | 276 } // namespace fileapi |
| 269 | 277 |
| 270 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ | 278 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ |
| OLD | NEW |