| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_util_proxy.h" | 10 #include "base/file_util_proxy.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // Callback to report the contents of a directory. If the contents of | 27 // Callback to report the contents of a directory. If the contents of |
| 28 // the given directory are reported in one batch, then |entries| will have | 28 // the given directory are reported in one batch, then |entries| will have |
| 29 // the list of all files/directories in the given directory, |has_more| will | 29 // the list of all files/directories in the given directory, |has_more| will |
| 30 // be false, and this callback will be called only once. If the contents of | 30 // be false, and this callback will be called only once. If the contents of |
| 31 // the given directory are reported in multiple chunks, then this callback | 31 // the given directory are reported in multiple chunks, then this callback |
| 32 // will be called multiple times, |entries| will have only a subset of | 32 // will be called multiple times, |entries| will have only a subset of |
| 33 // all contents (the subsets reported in any two calls are disjoint), and | 33 // all contents (the subsets reported in any two calls are disjoint), and |
| 34 // |has_more| will be true, except for the last chunk. | 34 // |has_more| will be true, except for the last chunk. |
| 35 virtual void DidReadDirectory( | 35 virtual void DidReadDirectory( |
| 36 const std::vector<base::file_util_proxy::Entry>& entries, | 36 const std::vector<base::FileUtilProxy::Entry>& entries, |
| 37 bool has_more) = 0; | 37 bool has_more) = 0; |
| 38 | 38 |
| 39 // Callback for opening a file system. Called with a name and root path for | 39 // Callback for opening a file system. Called with a name and root path for |
| 40 // the FileSystem when the request is accepted. Used by WebFileSystem API. | 40 // the FileSystem when the request is accepted. Used by WebFileSystem API. |
| 41 virtual void DidOpenFileSystem(const std::string& name, | 41 virtual void DidOpenFileSystem(const std::string& name, |
| 42 const FilePath& root_path) = 0; | 42 const FilePath& root_path) = 0; |
| 43 | 43 |
| 44 // Called with an error code when a requested operation has failed. | 44 // Called with an error code when a requested operation has failed. |
| 45 virtual void DidFail(base::PlatformFileError error_code) = 0; | 45 virtual void DidFail(base::PlatformFileError error_code) = 0; |
| 46 | 46 |
| 47 // Callback for FileWriter's write() call. | 47 // Callback for FileWriter's write() call. |
| 48 virtual void DidWrite(int64 bytes, bool complete) = 0; | 48 virtual void DidWrite(int64 bytes, bool complete) = 0; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace fileapi | 51 } // namespace fileapi |
| 52 | 52 |
| 53 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ | 53 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ |
| OLD | NEW |