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_CALLBACK_DISPATCHER_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 virtual ~FileSystemCallbackDispatcher(); | 25 virtual ~FileSystemCallbackDispatcher(); |
26 | 26 |
27 // Callback for various operations that don't require return values. | 27 // Callback for various operations that don't require return values. |
28 virtual void DidSucceed() = 0; | 28 virtual void DidSucceed() = 0; |
29 | 29 |
30 // Callback to report information for a file. | 30 // Callback to report information for a file. |
31 virtual void DidReadMetadata( | 31 virtual void DidReadMetadata( |
32 const base::PlatformFileInfo& file_info, | 32 const base::PlatformFileInfo& file_info, |
33 const base::FilePath& platform_path) = 0; | 33 const base::FilePath& platform_path) = 0; |
34 | 34 |
| 35 // Callback to report information for a file and its actual file path. |
| 36 virtual void DidCreateSnapshotFile( |
| 37 const base::PlatformFileInfo& file_info, |
| 38 const base::FilePath& platform_path) = 0; |
| 39 |
35 // Callback to report the contents of a directory. If the contents of | 40 // Callback to report the contents of a directory. If the contents of |
36 // the given directory are reported in one batch, then |entries| will have | 41 // the given directory are reported in one batch, then |entries| will have |
37 // the list of all files/directories in the given directory, |has_more| will | 42 // the list of all files/directories in the given directory, |has_more| will |
38 // be false, and this callback will be called only once. If the contents of | 43 // be false, and this callback will be called only once. If the contents of |
39 // the given directory are reported in multiple chunks, then this callback | 44 // the given directory are reported in multiple chunks, then this callback |
40 // will be called multiple times, |entries| will have only a subset of | 45 // will be called multiple times, |entries| will have only a subset of |
41 // all contents (the subsets reported in any two calls are disjoint), and | 46 // all contents (the subsets reported in any two calls are disjoint), and |
42 // |has_more| will be true, except for the last chunk. | 47 // |has_more| will be true, except for the last chunk. |
43 virtual void DidReadDirectory( | 48 virtual void DidReadDirectory( |
44 const std::vector<base::FileUtilProxy::Entry>& entries, | 49 const std::vector<base::FileUtilProxy::Entry>& entries, |
(...skipping 13 matching lines...) Expand all Loading... |
58 // Callback for OpenFile. This isn't in WebFileSystemCallbacks, as it's just | 63 // Callback for OpenFile. This isn't in WebFileSystemCallbacks, as it's just |
59 // for Pepper. | 64 // for Pepper. |
60 // The method will be responsible for closing |file|. | 65 // The method will be responsible for closing |file|. |
61 virtual void DidOpenFile( | 66 virtual void DidOpenFile( |
62 base::PlatformFile file); | 67 base::PlatformFile file); |
63 }; | 68 }; |
64 | 69 |
65 } // namespace fileapi | 70 } // namespace fileapi |
66 | 71 |
67 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ | 72 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ |
OLD | NEW |