Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Unified Diff: Source/modules/filesystem/FileSystemCallbacks.h

Issue 23704004: Make WebFileSystemCallbacks not self-destruct, deprecate AsyncFileSystem (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/filesystem/EntrySync.cpp ('k') | Source/modules/filesystem/FileSystemCallbacks.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/filesystem/FileSystemCallbacks.h
diff --git a/Source/modules/filesystem/FileSystemCallbacks.h b/Source/modules/filesystem/FileSystemCallbacks.h
index a6d942d58c3eefe002be2a9dc68bdb52c965a646..0c59faebbcbc2aa6d0fef59ed875bcc0227cbbbf 100644
--- a/Source/modules/filesystem/FileSystemCallbacks.h
+++ b/Source/modules/filesystem/FileSystemCallbacks.h
@@ -62,40 +62,29 @@ public:
// Other callback methods are implemented by each subclass.
- virtual bool shouldBlockUntilCompletion() const OVERRIDE
- {
- return m_blockUntilCompletion;
- }
-
- void setShouldBlockUntilCompletion(bool flag)
- {
- m_blockUntilCompletion = flag;
- }
-
protected:
- FileSystemCallbacksBase(PassRefPtr<ErrorCallback>);
+ FileSystemCallbacksBase(PassRefPtr<ErrorCallback>, DOMFileSystemBase*);
RefPtr<ErrorCallback> m_errorCallback;
- bool m_blockUntilCompletion;
+ DOMFileSystemBase* m_fileSystem;
};
// Subclasses ----------------------------------------------------------------
class EntryCallbacks : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<EntryCallbacks> create(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, PassRefPtr<DOMFileSystemBase>, const String& expectedPath, bool isDirectory);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, PassRefPtr<DOMFileSystemBase>, const String& expectedPath, bool isDirectory);
virtual void didSucceed();
private:
EntryCallbacks(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, PassRefPtr<DOMFileSystemBase>, const String& expectedPath, bool isDirectory);
RefPtr<EntryCallback> m_successCallback;
- RefPtr<DOMFileSystemBase> m_fileSystem;
String m_expectedPath;
bool m_isDirectory;
};
class EntriesCallbacks : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<EntriesCallbacks> create(PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>, PassRefPtr<DirectoryReaderBase>, const String& basePath);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>, PassRefPtr<DirectoryReaderBase>, const String& basePath);
virtual void didReadDirectoryEntry(const String& name, bool isDirectory);
virtual void didReadDirectoryEntries(bool hasMore);
@@ -109,8 +98,8 @@ private:
class FileSystemCallbacks : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<FileSystemCallbacks> create(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType);
- virtual void didOpenFileSystem(const String& name, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType);
+ virtual void didOpenFileSystem(const String& name, const KURL& rootURL);
private:
FileSystemCallbacks(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType);
@@ -121,8 +110,8 @@ private:
class ResolveURICallbacks : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<ResolveURICallbacks> create(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType, const String& filePath);
- virtual void didOpenFileSystem(const String& name, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType, const String& filePath);
+ virtual void didOpenFileSystem(const String& name, const KURL& rootURL);
private:
ResolveURICallbacks(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType, const String& filePath);
@@ -134,17 +123,17 @@ private:
class MetadataCallbacks : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<MetadataCallbacks> create(PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>, DOMFileSystemBase*);
virtual void didReadMetadata(const FileMetadata&);
private:
- MetadataCallbacks(PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>);
+ MetadataCallbacks(PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>, DOMFileSystemBase*);
RefPtr<MetadataCallback> m_successCallback;
};
class FileWriterBaseCallbacks : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<FileWriterBaseCallbacks> create(PassRefPtr<FileWriterBase>, PassRefPtr<FileWriterBaseCallback>, PassRefPtr<ErrorCallback>);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtr<FileWriterBase>, PassRefPtr<FileWriterBaseCallback>, PassRefPtr<ErrorCallback>);
virtual void didCreateFileWriter(PassOwnPtr<WebKit::WebFileWriter>, long long length);
private:
@@ -155,11 +144,11 @@ private:
class VoidCallbacks : public FileSystemCallbacksBase {
public:
- static PassOwnPtr<VoidCallbacks> create(PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>);
+ static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>, DOMFileSystemBase*);
virtual void didSucceed();
private:
- VoidCallbacks(PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>);
+ VoidCallbacks(PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>, DOMFileSystemBase*);
RefPtr<VoidCallback> m_successCallback;
};
« no previous file with comments | « Source/modules/filesystem/EntrySync.cpp ('k') | Source/modules/filesystem/FileSystemCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698