Index: Source/web/WebFileSystemCallbacksImpl.cpp |
diff --git a/Source/web/WebFileSystemCallbacksImpl.cpp b/Source/web/WebFileSystemCallbacksImpl.cpp |
index 41a00eb582a5230db97f263f436616d300ea5292..b993b3443371b2ebc4cea3503bf7eb7b03179b1f 100644 |
--- a/Source/web/WebFileSystemCallbacksImpl.cpp |
+++ b/Source/web/WebFileSystemCallbacksImpl.cpp |
@@ -31,6 +31,7 @@ |
#include "WebFileSystemCallbacksImpl.h" |
#include "AsyncFileSystemChromium.h" |
+#include "AsyncFileWriterChromium.h" |
#include "WorkerAsyncFileSystemChromium.h" |
#include "core/dom/ScriptExecutionContext.h" |
#include "core/platform/AsyncFileSystemCallbacks.h" |
@@ -39,6 +40,7 @@ |
#include "public/platform/WebFileSystem.h" |
#include "public/platform/WebFileSystemEntry.h" |
#include "public/platform/WebString.h" |
+#include "public/web/WebFileWriter.h" |
#include "wtf/Vector.h" |
using namespace WebCore; |
@@ -53,6 +55,14 @@ WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSyste |
ASSERT(m_callbacks); |
} |
+WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, PassOwnPtr<AsyncFileWriterChromium> writer) |
+ : m_callbacks(callbacks) |
+ , m_context(0) |
+ , m_writer(writer) |
+{ |
+ ASSERT(m_callbacks); |
+} |
+ |
WebFileSystemCallbacksImpl::~WebFileSystemCallbacksImpl() |
{ |
} |
@@ -115,6 +125,15 @@ void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const |
m_callbacks->didOpenFileSystem(name, rootURL, AsyncFileSystemChromium::create()); |
} |
+void WebFileSystemCallbacksImpl::didCreateFileWriter(WebFileWriter* webFileWriter, long long length) |
+{ |
+ // This object is intended to delete itself on exit. |
+ OwnPtr<WebFileSystemCallbacksImpl> callbacks = adoptPtr(this); |
+ |
+ m_writer->setWebFileWriter(adoptPtr(webFileWriter)); |
+ m_callbacks->didCreateFileWriter(m_writer.release(), length); |
+} |
+ |
void WebFileSystemCallbacksImpl::didFail(WebFileError error) |
{ |
m_callbacks->didFail(error); |