summaryrefslogtreecommitdiffstats
path: root/WebCore/html/FileStreamProxy.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-27 11:02:25 +0100
committerSteve Block <steveblock@google.com>2010-09-02 17:17:20 +0100
commite8b154fd68f9b33be40a3590e58347f353835f5c (patch)
tree0733ce26384183245aaa5656af26c653636fe6c1 /WebCore/html/FileStreamProxy.h
parentda56157816334089526a7a115a85fd85a6e9a1dc (diff)
downloadexternal_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.zip
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.gz
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.bz2
Merge WebKit at r66079 : Initial merge by git
Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
Diffstat (limited to 'WebCore/html/FileStreamProxy.h')
-rw-r--r--WebCore/html/FileStreamProxy.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/WebCore/html/FileStreamProxy.h b/WebCore/html/FileStreamProxy.h
index 1d03a58..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>
@@ -41,31 +42,28 @@
namespace WebCore {
-class Blob;
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(Blob*, 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*);
@@ -80,11 +78,10 @@ private:
void openForWriteOnFileThread(const String& path);
void closeOnFileThread();
void readOnFileThread(char* buffer, int length);
- void writeOnFileThread(Blob*, long long position, int length);
+ void writeOnFileThread(const KURL& blobURL, long long position, int length);
void truncateOnFileThread(long long position);
RefPtr<ScriptExecutionContext> m_context;
- FileStreamClient* m_client;
RefPtr<FileStream> m_stream;
};