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_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_util_proxy.h" | 10 #include "base/files/file_util_proxy.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // Used for GetMetadata(). |result| is the return code of the operation, | 61 // Used for GetMetadata(). |result| is the return code of the operation, |
62 // |file_info| is the obtained file info, and |platform_path| is the path | 62 // |file_info| is the obtained file info, and |platform_path| is the path |
63 // of the file. | 63 // of the file. |
64 typedef base::Callback< | 64 typedef base::Callback< |
65 void(base::PlatformFileError result, | 65 void(base::PlatformFileError result, |
66 const base::PlatformFileInfo& file_info, | 66 const base::PlatformFileInfo& file_info, |
67 const base::FilePath& platform_path)> GetMetadataCallback; | 67 const base::FilePath& platform_path)> GetMetadataCallback; |
68 | 68 |
69 // Used for OpenFile(). |result| is the return code of the operation. | 69 // Used for OpenFile(). |result| is the return code of the operation. |
| 70 // |on_close_callback| will be called after the file is closed in the child |
| 71 // process. |
70 typedef base::Callback< | 72 typedef base::Callback< |
71 void(base::PlatformFileError result, | 73 void(base::PlatformFileError result, |
72 base::PlatformFile file, | 74 base::PlatformFile file, |
| 75 const base::Closure& on_close_callback, |
73 base::ProcessHandle peer_handle)> OpenFileCallback; | 76 base::ProcessHandle peer_handle)> OpenFileCallback; |
74 | 77 |
75 // Used for ReadDirectoryCallback. | 78 // Used for ReadDirectoryCallback. |
76 typedef std::vector<base::FileUtilProxy::Entry> FileEntryList; | 79 typedef std::vector<base::FileUtilProxy::Entry> FileEntryList; |
77 | 80 |
78 // Used for ReadDirectory(). |result| is the return code of the operation, | 81 // Used for ReadDirectory(). |result| is the return code of the operation, |
79 // |file_list| is the list of files read, and |has_more| is true if some files | 82 // |file_list| is the list of files read, and |has_more| is true if some files |
80 // are yet to be read. | 83 // are yet to be read. |
81 typedef base::Callback< | 84 typedef base::Callback< |
82 void(base::PlatformFileError result, | 85 void(base::PlatformFileError result, |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 kOperationOpenFile, | 274 kOperationOpenFile, |
272 kOperationCloseFile, | 275 kOperationCloseFile, |
273 kOperationGetLocalPath, | 276 kOperationGetLocalPath, |
274 kOperationCancel, | 277 kOperationCancel, |
275 }; | 278 }; |
276 }; | 279 }; |
277 | 280 |
278 } // namespace fileapi | 281 } // namespace fileapi |
279 | 282 |
280 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 283 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
OLD | NEW |