[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jianli at chromium.org jianli at chromium.org
Wed Dec 22 12:23:04 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c698da663c0267ae8ecd5cd4d3d306e7dace08e4
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 20 18:33:10 2010 +0000

    Move FileStreamClient to platform and add AsyncFileStream interface.
    https://bugs.webkit.org/show_bug.cgi?id=44224
    
    Reviewed by David Levin.
    
    * GNUmakefile.am:
    * WebCore.gypi:
    * WebCore.pro:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCore.xcodeproj/project.pbxproj:
    * html/FileStreamProxy.cpp: Account for the change.
    (WebCore::FileStreamProxy::FileStreamProxy):
    (WebCore::FileStreamProxy::stop):
    * html/FileStreamProxy.h: Make it derive from AsyncFileStream.h.
    * platform/AsyncFileStream.h: Added.
    * platform/FileStreamClient.h: Renamed from WebCore/html/FileStreamClient.h.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65745 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f2a92f9..eb73c9b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-08-20  Jian Li  <jianli at chromium.org>
+
+        Reviewed by David Levin.
+
+        Move FileStreamClient to platform and add AsyncFileStream interface.
+        https://bugs.webkit.org/show_bug.cgi?id=44224
+
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/FileStreamProxy.cpp: Account for the change.
+        (WebCore::FileStreamProxy::FileStreamProxy):
+        (WebCore::FileStreamProxy::stop):
+        * html/FileStreamProxy.h: Make it derive from AsyncFileStream.h.
+        * platform/AsyncFileStream.h: Added.
+        * platform/FileStreamClient.h: Renamed from WebCore/html/FileStreamClient.h.
+
 2010-08-20  Abhishek Arya  <inferno at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 551198f..5acefc1 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1357,7 +1357,6 @@ webcore_sources += \
 	WebCore/html/FileReader.h \
 	WebCore/html/FileWriter.cpp \
 	WebCore/html/FileWriter.h \
-	WebCore/html/FileStreamClient.h \
 	WebCore/html/FileStreamProxy.cpp \
 	WebCore/html/FileStreamProxy.h \
 	WebCore/html/FileThread.cpp \
@@ -1879,6 +1878,7 @@ webcore_sources += \
 	WebCore/page/animation/KeyframeAnimation.h \
 	WebCore/platform/Arena.cpp \
 	WebCore/platform/Arena.h \
+	WebCore/platform/AsyncFileStream.h \
 	WebCore/platform/AutodrainedPool.h \
 	WebCore/platform/BlobItem.cpp \
 	WebCore/platform/BlobItem.h \
@@ -1905,6 +1905,7 @@ webcore_sources += \
 	WebCore/platform/FileChooser.h \
 	WebCore/platform/FileStream.cpp \
 	WebCore/platform/FileStream.h \
+	WebCore/platform/FileStreamClient.h \
 	WebCore/platform/FileSystem.cpp \
 	WebCore/platform/FileSystem.h \
 	WebCore/platform/FloatConversion.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 7175fb0..4f01877 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1521,7 +1521,6 @@
             'html/FileReader.h',
             'html/FileWriter.cpp',
             'html/FileWriter.h',
-            'html/FileStreamClient.h',
             'html/FileStreamProxy.cpp',
             'html/FileStreamProxy.h',
             'html/FileThread.cpp',
@@ -3038,6 +3037,7 @@
             'platform/wx/WidgetWx.cpp',
             'platform/Arena.cpp',
             'platform/Arena.h',
+            'platform/AsyncFileStream.h',
             'platform/AutodrainedPool.h',
             'platform/BlobItem.cpp',
             'platform/BlobItem.h',
@@ -3063,6 +3063,7 @@
             'platform/FileChooser.h',
             'platform/FileStream.cpp',
             'platform/FileStream.h',
+            'platform/FileStreamClient.h',
             'platform/FileSystem.cpp',
             'platform/FileSystem.h',
             'platform/FloatConversion.h',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 37d4bd7..a0e3556 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1411,7 +1411,6 @@ HEADERS += \
     html/FileError.h \
     html/FileList.h \
     html/FileReader.h \
-    html/FileStreamClient.h \
     html/FileStreamProxy.h \
     html/FileThread.h \
     html/FileThreadTask.h \
@@ -1646,6 +1645,7 @@ HEADERS += \
     platform/animation/Animation.h \
     platform/animation/AnimationList.h \
     platform/Arena.h \
+    platform/AsyncFileStream.h \
     platform/BlobItem.h \
     platform/ContentType.h \
     platform/ContextMenu.h \
@@ -1655,6 +1655,7 @@ HEADERS += \
     platform/DragImage.h \
     platform/FileChooser.h \
     platform/FileStream.h \
+    platform/FileStreamClient.h \
     platform/FileSystem.h \
     platform/GeolocationService.h \
     platform/image-decoders/ImageDecoder.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 18d4851..719793e 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -23977,6 +23977,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\platform\AsyncFileStream.h"
+				>
+			</File>
+			<File
 				RelativePath="..\platform\AutodrainedPool.h"
 				>
 			</File>
@@ -24077,6 +24081,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\platform\FileStreamClient.h"
+				>
+			</File>
+			<File
 				RelativePath="..\platform\FileSystem.cpp"
 				>
 			</File>
@@ -37181,10 +37189,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\html\FileStreamClient.h"
-				>
-			</File>
-			<File
 				RelativePath="..\html\FileStreamProxy.cpp"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 2435c61..3c9debc 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -721,7 +721,9 @@
 		2EED57FD1214A9C2007656BB /* ThreadableBlobRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EED57FB1214A9C2007656BB /* ThreadableBlobRegistry.cpp */; };
 		2EED57FE1214A9C2007656BB /* ThreadableBlobRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EED57FC1214A9C2007656BB /* ThreadableBlobRegistry.h */; };
 		2EF1BFEA121C9F4200C27627 /* FileStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EF1BFE8121C9F4200C27627 /* FileStream.cpp */; };
-		2EF1BFEB121C9F4200C27627 /* FileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF1BFE9121C9F4200C27627 /* FileStream.h */; };
+		2EF1BFEB121C9F4200C27627 /* FileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF1BFE9121C9F4200C27627 /* FileStream.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		2EF1BFF7121CB0BD00C27627 /* AsyncFileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF1BFF6121CB0BD00C27627 /* AsyncFileStream.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		2EF1BFF9121CB0CE00C27627 /* FileStreamClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF1BFF8121CB0CE00C27627 /* FileStreamClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		31288E720E3005D6003619AE /* WebKitCSSKeyframeRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31288E6E0E3005D6003619AE /* WebKitCSSKeyframeRule.cpp */; };
 		31288E730E3005D6003619AE /* WebKitCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */; };
 		31288E740E3005D6003619AE /* WebKitCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */; };
@@ -2380,7 +2382,6 @@
 		86243D0111BC31F700CC006A /* JSArrayBufferViewHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */; };
 		8952535211641B3400CABF00 /* FileThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8952535011641B3400CABF00 /* FileThread.cpp */; };
 		8952535311641B3400CABF00 /* FileThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 8952535111641B3400CABF00 /* FileThread.h */; };
-		895253D9116C4C6800CABF00 /* FileStreamClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 895253D6116C4C6800CABF00 /* FileStreamClient.h */; };
 		895253DC116C4EF500CABF00 /* FileStreamProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 895253DA116C4EF500CABF00 /* FileStreamProxy.cpp */; };
 		895253DD116C4EF500CABF00 /* FileStreamProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 895253DB116C4EF500CABF00 /* FileStreamProxy.h */; };
 		895253DF116C4F0600CABF00 /* FileThreadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 895253DE116C4F0600CABF00 /* FileThreadTask.h */; };
@@ -6537,6 +6538,8 @@
 		2EED57FC1214A9C2007656BB /* ThreadableBlobRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadableBlobRegistry.h; sourceTree = "<group>"; };
 		2EF1BFE8121C9F4200C27627 /* FileStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileStream.cpp; sourceTree = "<group>"; };
 		2EF1BFE9121C9F4200C27627 /* FileStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileStream.h; sourceTree = "<group>"; };
+		2EF1BFF6121CB0BD00C27627 /* AsyncFileStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncFileStream.h; sourceTree = "<group>"; };
+		2EF1BFF8121CB0CE00C27627 /* FileStreamClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileStreamClient.h; sourceTree = "<group>"; };
 		31288E6E0E3005D6003619AE /* WebKitCSSKeyframeRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSKeyframeRule.cpp; sourceTree = "<group>"; };
 		31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSKeyframeRule.h; sourceTree = "<group>"; };
 		31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSKeyframesRule.cpp; sourceTree = "<group>"; };
@@ -8231,7 +8234,6 @@
 		86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferViewHelper.h; sourceTree = "<group>"; };
 		8952535011641B3400CABF00 /* FileThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileThread.cpp; sourceTree = "<group>"; };
 		8952535111641B3400CABF00 /* FileThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileThread.h; sourceTree = "<group>"; };
-		895253D6116C4C6800CABF00 /* FileStreamClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileStreamClient.h; sourceTree = "<group>"; };
 		895253DA116C4EF500CABF00 /* FileStreamProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileStreamProxy.cpp; sourceTree = "<group>"; };
 		895253DB116C4EF500CABF00 /* FileStreamProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileStreamProxy.h; sourceTree = "<group>"; };
 		895253DE116C4F0600CABF00 /* FileThreadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileThreadTask.h; sourceTree = "<group>"; };
@@ -14014,7 +14016,6 @@
 				2E94F3CB118B908E00B7F75D /* FileReader.cpp */,
 				2E94F3CC118B908E00B7F75D /* FileReader.h */,
 				2E94F427119205B300B7F75D /* FileReader.idl */,
-				895253D6116C4C6800CABF00 /* FileStreamClient.h */,
 				895253DA116C4EF500CABF00 /* FileStreamProxy.cpp */,
 				895253DB116C4EF500CABF00 /* FileStreamProxy.h */,
 				8952535011641B3400CABF00 /* FileThread.cpp */,
@@ -16575,6 +16576,7 @@
 				B2C3D9EC0D006C1D00EF6F26 /* text */,
 				BCFB2F74097A2E1A00BA703D /* Arena.cpp */,
 				BCFB2F75097A2E1A00BA703D /* Arena.h */,
+				2EF1BFF6121CB0BD00C27627 /* AsyncFileStream.h */,
 				51E1ECB10C91C55600DC255B /* AutodrainedPool.h */,
 				8988E10C11A3508B00DB732E /* BlobItem.cpp */,
 				8988E10D11A3508B00DB732E /* BlobItem.h */,
@@ -16602,6 +16604,7 @@
 				066C772A0AB603B700238CC4 /* FileChooser.h */,
 				2EF1BFE8121C9F4200C27627 /* FileStream.cpp */,
 				2EF1BFE9121C9F4200C27627 /* FileStream.h */,
+				2EF1BFF8121CB0CE00C27627 /* FileStreamClient.h */,
 				C57FEDE01212EE9C0097BE65 /* FileSystem.cpp */,
 				514B3F720C722047000530DF /* FileSystem.h */,
 				BC073BA90C399B1F000F5979 /* FloatConversion.h */,
@@ -18681,7 +18684,6 @@
 				2E3BC0BD117D3A4F00B9409A /* FileError.h in Headers */,
 				BCDBB8AC0E088CA500C60FF6 /* FileList.h in Headers */,
 				2E94F4511192096A00B7F75D /* FileReader.h in Headers */,
-				895253D9116C4C6800CABF00 /* FileStreamClient.h in Headers */,
 				895253DD116C4EF500CABF00 /* FileStreamProxy.h in Headers */,
 				514B3F730C722047000530DF /* FileSystem.h in Headers */,
 				8952535311641B3400CABF00 /* FileThread.h in Headers */,
@@ -20329,6 +20331,8 @@
 				2EDEF1F8121B0EFC00726DB2 /* BlobStorageData.h in Headers */,
 				2EF1BFEB121C9F4200C27627 /* FileStream.h in Headers */,
 				46A26906121B6B4300C41F3A /* FileWriter.h in Headers */,
+				2EF1BFF7121CB0BD00C27627 /* AsyncFileStream.h in Headers */,
+				2EF1BFF9121CB0CE00C27627 /* FileStreamClient.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/html/FileStreamProxy.cpp b/WebCore/html/FileStreamProxy.cpp
index f289c84..30813d3 100644
--- a/WebCore/html/FileStreamProxy.cpp
+++ b/WebCore/html/FileStreamProxy.cpp
@@ -37,7 +37,6 @@
 #include "Blob.h"
 #include "CrossThreadTask.h"
 #include "FileStream.h"
-#include "FileStreamClient.h"
 #include "FileThread.h"
 #include "FileThreadTask.h"
 #include "PlatformString.h"
@@ -46,8 +45,8 @@
 namespace WebCore {
 
 inline FileStreamProxy::FileStreamProxy(ScriptExecutionContext* context, FileStreamClient* client)
-    : m_context(context)
-    , m_client(client)
+    : AsyncFileStream(client)
+    , m_context(context)
     , m_stream(FileStream::create())
 {
 }
@@ -91,7 +90,7 @@ void FileStreamProxy::startOnFileThread()
 void FileStreamProxy::stop()
 {
     // Clear the client so that we won't be calling callbacks on the client.
-    m_client = 0;
+    setClient(0);
 
     fileThread()->unscheduleTasks(m_stream.get());
     fileThread()->postTask(createFileThreadTask(this, &FileStreamProxy::stopOnFileThread));
diff --git a/WebCore/html/FileStreamProxy.h b/WebCore/html/FileStreamProxy.h
index 6dc1cc7..35a3af8 100644
--- a/WebCore/html/FileStreamProxy.h
+++ b/WebCore/html/FileStreamProxy.h
@@ -34,6 +34,7 @@
 
 #if ENABLE(BLOB) || ENABLE(FILE_WRITER)
 
+#include "AsyncFileStream.h"
 #include <wtf/Forward.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
@@ -42,30 +43,27 @@
 namespace WebCore {
 
 class FileStream;
-class FileStreamClient;
 class FileThread;
 class KURL;
 class ScriptExecutionContext;
 
 // A proxy module that asynchronously calls corresponding FileStream methods on the file thread.  Note: you must call stop() first and then release the reference to destruct the FileStreamProxy instance.
-class FileStreamProxy : public RefCounted<FileStreamProxy> {
+class FileStreamProxy : public AsyncFileStream {
 public:
     static PassRefPtr<FileStreamProxy> create(ScriptExecutionContext*, FileStreamClient*);
     virtual ~FileStreamProxy();
 
-    void getSize(const String& path, double expectedModificationTime);
-    void openForRead(const String& path, long long offset, long long length);
-    void openForWrite(const String& path);
-    void close();
-    void read(char* buffer, int length);
-    void write(const KURL& blobURL, long long position, int length);
-    void truncate(long long position);
+    virtual void getSize(const String& path, double expectedModificationTime);
+    virtual void openForRead(const String& path, long long offset, long long length);
+    virtual void openForWrite(const String& path);
+    virtual void close();
+    virtual void read(char* buffer, int length);
+    virtual void write(const KURL& blobURL, long long position, int length);
+    virtual void truncate(long long position);
 
     // Stops the proxy and scedules it to be destructed.  All the pending tasks will be aborted and the file stream will be closed.
     // Note: the caller should deref the instance immediately after calling stop().
-    void stop();
-
-    FileStreamClient* client() const { return m_client; }
+    virtual void stop();
 
 private:
     FileStreamProxy(ScriptExecutionContext*, FileStreamClient*);
@@ -84,7 +82,6 @@ private:
     void truncateOnFileThread(long long position);
 
     RefPtr<ScriptExecutionContext> m_context;
-    FileStreamClient* m_client;
     RefPtr<FileStream> m_stream;
 };
 
diff --git a/WebCore/platform/AsyncFileStream.h b/WebCore/platform/AsyncFileStream.h
new file mode 100644
index 0000000..3abda01
--- /dev/null
+++ b/WebCore/platform/AsyncFileStream.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 Google Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AsyncFileStream_h
+#define AsyncFileStream_h
+
+#if ENABLE(BLOB) || ENABLE(FILE_WRITER)
+
+#include "FileStreamClient.h"
+#include <wtf/Forward.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class KURL;
+
+class AsyncFileStream : public RefCounted<AsyncFileStream> {
+public:
+    virtual ~AsyncFileStream() { }
+
+    virtual void getSize(const String& path, double expectedModificationTime) = 0;
+    virtual void openForRead(const String& path, long long offset, long long length) = 0;
+    virtual void openForWrite(const String& path) = 0;
+    virtual void close() = 0;
+    virtual void read(char* buffer, int length) = 0;
+    virtual void write(const KURL& blobURL, long long position, int length) = 0;
+    virtual void truncate(long long position) = 0;
+    virtual void stop() = 0;
+
+    FileStreamClient* client() const { return m_client; }
+    void setClient(FileStreamClient* client) { m_client = client; }
+
+protected:
+    AsyncFileStream(FileStreamClient* client)
+        : m_client(client)
+    {
+    }
+
+private:
+    FileStreamClient* m_client;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(BLOB) || ENABLE(FILE_WRITER)
+
+#endif // AsyncFileStream_h
diff --git a/WebCore/html/FileStreamClient.h b/WebCore/platform/FileStreamClient.h
similarity index 100%
rename from WebCore/html/FileStreamClient.h
rename to WebCore/platform/FileStreamClient.h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list