| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef FileSystemCallbacks_h | 31 #ifndef FileSystemCallbacks_h |
| 32 #define FileSystemCallbacks_h | 32 #define FileSystemCallbacks_h |
| 33 | 33 |
| 34 #include "core/platform/AsyncFileSystemCallbacks.h" | 34 #include "core/platform/AsyncFileSystemCallbacks.h" |
| 35 #include "modules/filesystem/EntriesCallback.h" |
| 35 #include "modules/filesystem/FileSystemType.h" | 36 #include "modules/filesystem/FileSystemType.h" |
| 36 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
| 37 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
| 38 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.h" |
| 39 | 40 |
| 40 namespace WebCore { | 41 namespace WebCore { |
| 41 | 42 |
| 42 class AsyncFileWriter; | 43 class AsyncFileWriter; |
| 43 class DOMFileSystemBase; | 44 class DOMFileSystemBase; |
| 44 class DirectoryReaderBase; | 45 class DirectoryReaderBase; |
| 45 class EntriesCallback; | 46 class EntriesCallback; |
| 46 class EntryArray; | |
| 47 class EntryCallback; | 47 class EntryCallback; |
| 48 class ErrorCallback; | 48 class ErrorCallback; |
| 49 struct FileMetadata; | 49 struct FileMetadata; |
| 50 class FileSystemCallback; | 50 class FileSystemCallback; |
| 51 class FileWriterBase; | 51 class FileWriterBase; |
| 52 class FileWriterBaseCallback; | 52 class FileWriterBaseCallback; |
| 53 class MetadataCallback; | 53 class MetadataCallback; |
| 54 class ScriptExecutionContext; | 54 class ScriptExecutionContext; |
| 55 class VoidCallback; | 55 class VoidCallback; |
| 56 | 56 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 public: | 98 public: |
| 99 static PassOwnPtr<EntriesCallbacks> create(PassRefPtr<EntriesCallback>, Pass
RefPtr<ErrorCallback>, PassRefPtr<DirectoryReaderBase>, const String& basePath); | 99 static PassOwnPtr<EntriesCallbacks> create(PassRefPtr<EntriesCallback>, Pass
RefPtr<ErrorCallback>, PassRefPtr<DirectoryReaderBase>, const String& basePath); |
| 100 virtual void didReadDirectoryEntry(const String& name, bool isDirectory); | 100 virtual void didReadDirectoryEntry(const String& name, bool isDirectory); |
| 101 virtual void didReadDirectoryEntries(bool hasMore); | 101 virtual void didReadDirectoryEntries(bool hasMore); |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 EntriesCallbacks(PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>, Pas
sRefPtr<DirectoryReaderBase>, const String& basePath); | 104 EntriesCallbacks(PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>, Pas
sRefPtr<DirectoryReaderBase>, const String& basePath); |
| 105 RefPtr<EntriesCallback> m_successCallback; | 105 RefPtr<EntriesCallback> m_successCallback; |
| 106 RefPtr<DirectoryReaderBase> m_directoryReader; | 106 RefPtr<DirectoryReaderBase> m_directoryReader; |
| 107 String m_basePath; | 107 String m_basePath; |
| 108 RefPtr<EntryArray> m_entries; | 108 EntryVector m_entries; |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 class FileSystemCallbacks : public FileSystemCallbacksBase { | 111 class FileSystemCallbacks : public FileSystemCallbacksBase { |
| 112 public: | 112 public: |
| 113 static PassOwnPtr<FileSystemCallbacks> create(PassRefPtr<FileSystemCallback>
, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType); | 113 static PassOwnPtr<FileSystemCallbacks> create(PassRefPtr<FileSystemCallback>
, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType); |
| 114 virtual void didOpenFileSystem(const String& name, const KURL& rootURL, Pass
OwnPtr<AsyncFileSystem>); | 114 virtual void didOpenFileSystem(const String& name, const KURL& rootURL, Pass
OwnPtr<AsyncFileSystem>); |
| 115 | 115 |
| 116 private: | 116 private: |
| 117 FileSystemCallbacks(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback
>, ScriptExecutionContext*, FileSystemType); | 117 FileSystemCallbacks(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback
>, ScriptExecutionContext*, FileSystemType); |
| 118 RefPtr<FileSystemCallback> m_successCallback; | 118 RefPtr<FileSystemCallback> m_successCallback; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 virtual void didSucceed(); | 160 virtual void didSucceed(); |
| 161 | 161 |
| 162 private: | 162 private: |
| 163 VoidCallbacks(PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>); | 163 VoidCallbacks(PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>); |
| 164 RefPtr<VoidCallback> m_successCallback; | 164 RefPtr<VoidCallback> m_successCallback; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 } // namespace | 167 } // namespace |
| 168 | 168 |
| 169 #endif // FileSystemCallbacks_h | 169 #endif // FileSystemCallbacks_h |
| OLD | NEW |