| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebFileSystemCallbacks_h | 31 #ifndef WebFileSystemCallbacks_h |
| 32 #define WebFileSystemCallbacks_h | 32 #define WebFileSystemCallbacks_h |
| 33 | 33 |
| 34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
| 35 #include "WebFileError.h" | 35 #include "WebFileError.h" |
| 36 #include "WebFileSystemEntry.h" | 36 #include "WebFileSystemEntry.h" |
| 37 #include "WebFileSystemType.h" |
| 37 #include "WebPrivatePtr.h" | 38 #include "WebPrivatePtr.h" |
| 38 #include "WebVector.h" | 39 #include "WebVector.h" |
| 39 | 40 |
| 40 namespace WebCore { | 41 namespace WebCore { |
| 41 class AsyncFileSystemCallbacks; | 42 class AsyncFileSystemCallbacks; |
| 42 } | 43 } |
| 43 namespace WTF { template <typename T> class PassOwnPtr; } | 44 namespace WTF { template <typename T> class PassOwnPtr; } |
| 44 | 45 |
| 45 namespace WebKit { | 46 namespace WebKit { |
| 46 | 47 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Callback for WebFileSystem::readDirectory. Called with a vector of | 84 // Callback for WebFileSystem::readDirectory. Called with a vector of |
| 84 // file entries in the requested directory. This callback might be called | 85 // file entries in the requested directory. This callback might be called |
| 85 // multiple times if the directory has many entries. |hasMore| must be | 86 // multiple times if the directory has many entries. |hasMore| must be |
| 86 // true when there are more entries. | 87 // true when there are more entries. |
| 87 WEBKIT_EXPORT void didReadDirectory(const WebVector<WebFileSystemEntry>&, bo
ol hasMore); | 88 WEBKIT_EXPORT void didReadDirectory(const WebVector<WebFileSystemEntry>&, bo
ol hasMore); |
| 88 | 89 |
| 89 // Callback for WebFileSystem::openFileSystem. Called with a name and | 90 // Callback for WebFileSystem::openFileSystem. Called with a name and |
| 90 // root URL for the FileSystem when the request is accepted. | 91 // root URL for the FileSystem when the request is accepted. |
| 91 WEBKIT_EXPORT void didOpenFileSystem(const WebString& name, const WebURL& ro
otURL); | 92 WEBKIT_EXPORT void didOpenFileSystem(const WebString& name, const WebURL& ro
otURL); |
| 92 | 93 |
| 94 // Callback for WebFileSystem::resolveURL. Called with a name, root URL and |
| 95 // file path for the FileSystem when the request is accepted. |isDirectory| |
| 96 // must be true when an entry to be resolved is a directory. |
| 97 WEBKIT_EXPORT void didResolveURL(const WebString& name, const WebURL& rootUR
L, WebFileSystemType, const WebString& filePath, bool isDirectory); |
| 98 |
| 93 // Callback for WebFileSystem::createFileWriter. Called with an instance | 99 // Callback for WebFileSystem::createFileWriter. Called with an instance |
| 94 // of WebFileWriter and the target file length. The writer's ownership | 100 // of WebFileWriter and the target file length. The writer's ownership |
| 95 // is transferred to the callback. | 101 // is transferred to the callback. |
| 96 WEBKIT_EXPORT void didCreateFileWriter(WebFileWriter*, long long length); | 102 WEBKIT_EXPORT void didCreateFileWriter(WebFileWriter*, long long length); |
| 97 | 103 |
| 98 // Called with an error code when a requested operation hasn't been | 104 // Called with an error code when a requested operation hasn't been |
| 99 // completed. | 105 // completed. |
| 100 WEBKIT_EXPORT void didFail(WebFileError); | 106 WEBKIT_EXPORT void didFail(WebFileError); |
| 101 | 107 |
| 102 // Returns true if the caller expects to be blocked until the request | 108 // Returns true if the caller expects to be blocked until the request |
| 103 // is fullfilled. | 109 // is fullfilled. |
| 104 WEBKIT_EXPORT bool shouldBlockUntilCompletion() const; | 110 WEBKIT_EXPORT bool shouldBlockUntilCompletion() const; |
| 105 | 111 |
| 106 private: | 112 private: |
| 107 WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private; | 113 WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private; |
| 108 }; | 114 }; |
| 109 | 115 |
| 110 } // namespace WebKit | 116 } // namespace WebKit |
| 111 | 117 |
| 112 #endif | 118 #endif |
| OLD | NEW |