| 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 12 matching lines...) Expand all Loading... |
| 23 class WEBKIT_STORAGE_EXPORT FileSystemCallbackDispatcher { | 23 class WEBKIT_STORAGE_EXPORT FileSystemCallbackDispatcher { |
| 24 public: | 24 public: |
| 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 FilePath& platform_path) = 0; | 33 const base::FilePath& platform_path) = 0; |
| 34 | 34 |
| 35 // Callback to report the contents of a directory. If the contents of | 35 // 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 | 36 // 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 | 37 // 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 | 38 // 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 | 39 // the given directory are reported in multiple chunks, then this callback |
| 40 // will be called multiple times, |entries| will have only a subset of | 40 // 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 | 41 // all contents (the subsets reported in any two calls are disjoint), and |
| 42 // |has_more| will be true, except for the last chunk. | 42 // |has_more| will be true, except for the last chunk. |
| 43 virtual void DidReadDirectory( | 43 virtual void DidReadDirectory( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 58 // Callback for OpenFile. This isn't in WebFileSystemCallbacks, as it's just | 58 // Callback for OpenFile. This isn't in WebFileSystemCallbacks, as it's just |
| 59 // for Pepper. | 59 // for Pepper. |
| 60 // The method will be responsible for closing |file|. | 60 // The method will be responsible for closing |file|. |
| 61 virtual void DidOpenFile( | 61 virtual void DidOpenFile( |
| 62 base::PlatformFile file); | 62 base::PlatformFile file); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace fileapi | 65 } // namespace fileapi |
| 66 | 66 |
| 67 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ | 67 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CALLBACK_DISPATCHER_H_ |
| OLD | NEW |