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_FILE_UTIL_PROXY_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ |
7 | 7 |
8 #include <vector> | |
9 | |
10 #include "base/callback.h" | 8 #include "base/callback.h" |
11 #include "base/file_path.h" | 9 #include "base/file_path.h" |
12 #include "base/file_util_proxy.h" | 10 #include "base/file_util_proxy.h" |
13 #include "base/memory/ref_counted.h" | |
14 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
15 #include "base/tracked_objects.h" | |
16 #include "webkit/fileapi/file_system_file_util.h" | 12 #include "webkit/fileapi/file_system_file_util.h" |
17 #include "webkit/fileapi/file_system_operation.h" | 13 #include "webkit/fileapi/file_system_operation.h" |
18 | 14 |
19 namespace fileapi { | 15 namespace fileapi { |
20 | 16 |
21 using base::PlatformFile; | |
22 using base::PlatformFileError; | |
23 using base::PlatformFileInfo; | |
24 | |
25 class FileSystemFileUtil; | 17 class FileSystemFileUtil; |
26 class FileSystemOperationContext; | 18 class FileSystemOperationContext; |
27 class FileSystemURL; | 19 class FileSystemURL; |
28 | 20 |
29 // This class provides asynchronous access to FileSystemFileUtil methods for | 21 // This class provides asynchronous access to FileSystemFileUtil methods for |
30 // FileSystem API operations. This also implements cross-FileUtil copy/move | 22 // FileSystem API operations. This also implements cross-FileUtil copy/move |
31 // operations on top of FileSystemFileUtil methods. | 23 // operations on top of FileSystemFileUtil methods. |
32 class FileSystemFileUtilProxy { | 24 class FileSystemFileUtilProxy { |
33 public: | 25 public: |
34 // Some of the proxy routines are just wrapping around the FileUtilProxy's | 26 // Some of the proxy routines are just wrapping around the FileUtilProxy's |
35 // relay methods, so we use the same types as FileUtilProxy for them. | 27 // relay methods, so we use the same types as FileUtilProxy for them. |
36 typedef base::FileUtilProxy::Entry Entry; | 28 typedef base::FileUtilProxy::Entry Entry; |
37 typedef base::FileUtilProxy::CreateOrOpenCallback CreateOrOpenCallback; | 29 typedef base::FileUtilProxy::CreateOrOpenCallback CreateOrOpenCallback; |
38 | 30 |
39 typedef base::Callback<void(PlatformFileError status)> StatusCallback; | 31 typedef base::Callback<void(base::PlatformFileError status)> StatusCallback; |
40 typedef base::Callback<void(PlatformFileError status, | 32 typedef base::Callback<void(base::PlatformFileError status, |
41 bool created)> EnsureFileExistsCallback; | 33 bool created)> EnsureFileExistsCallback; |
42 typedef FileSystemOperation::GetMetadataCallback GetFileInfoCallback; | 34 typedef FileSystemOperation::GetMetadataCallback GetFileInfoCallback; |
43 typedef FileSystemOperation::ReadDirectoryCallback ReadDirectoryCallback; | 35 typedef FileSystemOperation::ReadDirectoryCallback ReadDirectoryCallback; |
44 | 36 |
45 typedef base::Callback< | 37 typedef base::Callback< |
46 void(base::PlatformFileError result, | 38 void(base::PlatformFileError result, |
47 const base::PlatformFileInfo& file_info, | 39 const base::PlatformFileInfo& file_info, |
48 const FilePath& platform_path, | 40 const FilePath& platform_path, |
49 FileSystemFileUtil::SnapshotFilePolicy snapshot_policy)> | 41 FileSystemFileUtil::SnapshotFilePolicy snapshot_policy)> |
50 SnapshotFileCallback; | 42 SnapshotFileCallback; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 int64 length, | 167 int64 length, |
176 const StatusCallback& callback); | 168 const StatusCallback& callback); |
177 | 169 |
178 private: | 170 private: |
179 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemFileUtilProxy); | 171 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemFileUtilProxy); |
180 }; | 172 }; |
181 | 173 |
182 } // namespace fileapi | 174 } // namespace fileapi |
183 | 175 |
184 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ | 176 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ |
OLD | NEW |