Index: public/platform/WebFileSystemCallbacks.h |
diff --git a/public/platform/WebFileSystemCallbacks.h b/public/platform/WebFileSystemCallbacks.h |
index c8ab90b3fe19b08eb0d06ff437cab5dcce487a10..261552efefd7635183c7593226bb01d86a31edaf 100644 |
--- a/public/platform/WebFileSystemCallbacks.h |
+++ b/public/platform/WebFileSystemCallbacks.h |
@@ -31,56 +31,82 @@ |
#ifndef WebFileSystemCallbacks_h |
#define WebFileSystemCallbacks_h |
+#include "WebCommon.h" |
#include "WebFileError.h" |
#include "WebFileSystemEntry.h" |
+#include "WebPrivatePtr.h" |
#include "WebVector.h" |
+#if WEBKIT_IMPLEMENTATION |
abarth-chromium
2013/08/30 16:18:25
You don;t need to wrap these forward declarations
kinuko
2013/09/03 09:32:49
Done.
|
+namespace WebCore { |
+class AsyncFileSystemCallbacks; |
+} |
+namespace WTF { template <typename T> class PassOwnPtr; } |
+#endif |
+ |
namespace WebKit { |
struct WebFileInfo; |
class WebFileWriter; |
class WebString; |
class WebURL; |
+class WebFileSystemCallbacksPrivate; |
class WebFileSystemCallbacks { |
public: |
+ ~WebFileSystemCallbacks() { reset(); } |
+ WebFileSystemCallbacks() { } |
+ WebFileSystemCallbacks(const WebFileSystemCallbacks& c) { assign(c); } |
+ WebFileSystemCallbacks& operator=(const WebFileSystemCallbacks& c) |
+ { |
+ assign(c); |
+ return *this; |
+ } |
+ |
+ WEBKIT_EXPORT void reset(); |
+ WEBKIT_EXPORT void assign(const WebFileSystemCallbacks&); |
+ |
+#if WEBKIT_IMPLEMENTATION |
+ WebFileSystemCallbacks(const WTF::PassOwnPtr<WebCore::AsyncFileSystemCallbacks>&); |
+#endif |
+ |
// Callback for WebFileSystem's various operations that don't require |
// return values. |
- virtual void didSucceed() = 0; |
+ WEBKIT_EXPORT void didSucceed(); |
// Callback for WebFileSystem::readMetadata. Called with the file metadata |
// for the requested path. |
- virtual void didReadMetadata(const WebFileInfo&) = 0; |
+ WEBKIT_EXPORT void didReadMetadata(const WebFileInfo&); |
// Callback for WebFileSystem::createSnapshot. The metadata also includes the |
// platform file path. |
- virtual void didCreateSnapshotFile(const WebFileInfo&) { WEBKIT_ASSERT_NOT_REACHED(); } |
+ WEBKIT_EXPORT void didCreateSnapshotFile(const WebFileInfo&); |
// Callback for WebFileSystem::readDirectory. Called with a vector of |
// file entries in the requested directory. This callback might be called |
// multiple times if the directory has many entries. |hasMore| must be |
// true when there are more entries. |
- virtual void didReadDirectory(const WebVector<WebFileSystemEntry>&, bool hasMore) = 0; |
+ WEBKIT_EXPORT void didReadDirectory(const WebVector<WebFileSystemEntry>&, bool hasMore); |
// Callback for WebFileSystem::openFileSystem. Called with a name and |
// root URL for the FileSystem when the request is accepted. |
- virtual void didOpenFileSystem(const WebString& name, const WebURL& rootURL) = 0; |
+ WEBKIT_EXPORT void didOpenFileSystem(const WebString& name, const WebURL& rootURL); |
// Callback for WebFileSystem::createFileWriter. Called with an instance |
// of WebFileWriter and the target file length. The writer's ownership |
// is transferred to the callback. |
- virtual void didCreateFileWriter(WebFileWriter* writer, long long length) { WEBKIT_ASSERT_NOT_REACHED(); } |
+ WEBKIT_EXPORT void didCreateFileWriter(WebFileWriter*, long long length); |
// Called with an error code when a requested operation hasn't been |
// completed. |
- virtual void didFail(WebFileError) = 0; |
+ WEBKIT_EXPORT void didFail(WebFileError); |
// Returns true if the caller expects to be blocked until the request |
// is fullfilled. |
- virtual bool shouldBlockUntilCompletion() const = 0; |
+ WEBKIT_EXPORT bool shouldBlockUntilCompletion() const; |
-protected: |
- virtual ~WebFileSystemCallbacks() { } |
+private: |
+ WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private; |
}; |
} // namespace WebKit |