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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void(base::PlatformFileError result, | 67 void(base::PlatformFileError result, |
68 const base::PlatformFileInfo& file_info, | 68 const base::PlatformFileInfo& file_info, |
69 const FilePath& platform_path)> GetMetadataCallback; | 69 const FilePath& platform_path)> GetMetadataCallback; |
70 | 70 |
71 // Used for OpenFile(). |result| is the return code of the operation. | 71 // Used for OpenFile(). |result| is the return code of the operation. |
72 typedef base::Callback< | 72 typedef base::Callback< |
73 void(base::PlatformFileError result, | 73 void(base::PlatformFileError result, |
74 base::PlatformFile file, | 74 base::PlatformFile file, |
75 base::ProcessHandle peer_handle)> OpenFileCallback; | 75 base::ProcessHandle peer_handle)> OpenFileCallback; |
76 | 76 |
| 77 // Used for ReadDirectoryCallback. |
| 78 typedef std::vector<base::FileUtilProxy::Entry> FileEntryList; |
| 79 |
77 // Used for ReadDirectory(). |result| is the return code of the operation, | 80 // Used for ReadDirectory(). |result| is the return code of the operation, |
78 // |file_list| is the list of files read, and |has_more| is true if some files | 81 // |file_list| is the list of files read, and |has_more| is true if some files |
79 // are yet to be read. | 82 // are yet to be read. |
80 typedef base::Callback< | 83 typedef base::Callback< |
81 void(base::PlatformFileError result, | 84 void(base::PlatformFileError result, |
82 const std::vector<base::FileUtilProxy::Entry>& file_list, | 85 const FileEntryList& file_list, |
83 bool has_more)> ReadDirectoryCallback; | 86 bool has_more)> ReadDirectoryCallback; |
84 | 87 |
85 // Used for CreateSnapshotFile(). (Please see the comment at | 88 // Used for CreateSnapshotFile(). (Please see the comment at |
86 // CreateSnapshotFile() below for how the method is called) | 89 // CreateSnapshotFile() below for how the method is called) |
87 // |result| is the return code of the operation. | 90 // |result| is the return code of the operation. |
88 // |file_info| is the metadata of the snapshot file created. | 91 // |file_info| is the metadata of the snapshot file created. |
89 // |platform_path| is the path to the snapshot file created. | 92 // |platform_path| is the path to the snapshot file created. |
90 // | 93 // |
91 // The snapshot file could simply be of the local file pointed by the given | 94 // The snapshot file could simply be of the local file pointed by the given |
92 // filesystem URL in local filesystem cases; remote filesystems | 95 // filesystem URL in local filesystem cases; remote filesystems |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 kOperationOpenFile, | 272 kOperationOpenFile, |
270 kOperationCloseFile, | 273 kOperationCloseFile, |
271 kOperationGetLocalPath, | 274 kOperationGetLocalPath, |
272 kOperationCancel, | 275 kOperationCancel, |
273 }; | 276 }; |
274 }; | 277 }; |
275 | 278 |
276 } // namespace fileapi | 279 } // namespace fileapi |
277 | 280 |
278 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ | 281 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_INTERFACE_H_ |
OLD | NEW |