| 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 26 matching lines...) Expand all Loading... |
| 37 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
| 38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class DOMFileSystemBase; | 42 class DOMFileSystemBase; |
| 43 class DirectoryReaderBase; | 43 class DirectoryReaderBase; |
| 44 class EntriesCallback; | 44 class EntriesCallback; |
| 45 class EntryCallback; | 45 class EntryCallback; |
| 46 class ErrorCallback; | 46 class ErrorCallback; |
| 47 class FileCallback; | 47 class BlobCallback; |
| 48 class FileMetadata; | 48 class FileMetadata; |
| 49 class FileSystemCallback; | 49 class FileSystemCallback; |
| 50 class FileWriterBase; | 50 class FileWriterBase; |
| 51 class FileWriterBaseCallback; | 51 class FileWriterBaseCallback; |
| 52 class MetadataCallback; | 52 class MetadataCallback; |
| 53 class ExecutionContext; | 53 class ExecutionContext; |
| 54 class VoidCallback; | 54 class VoidCallback; |
| 55 | 55 |
| 56 class FileSystemCallbacksBase : public AsyncFileSystemCallbacks { | 56 class FileSystemCallbacksBase : public AsyncFileSystemCallbacks { |
| 57 public: | 57 public: |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 void didCreateFileWriter(PassOwnPtr<WebFileWriter>, long long length) overri
de; | 144 void didCreateFileWriter(PassOwnPtr<WebFileWriter>, long long length) overri
de; |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 FileWriterBaseCallbacks(FileWriterBase*, FileWriterBaseCallback*, ErrorCallb
ack*, ExecutionContext*); | 147 FileWriterBaseCallbacks(FileWriterBase*, FileWriterBaseCallback*, ErrorCallb
ack*, ExecutionContext*); |
| 148 Persistent<FileWriterBase> m_fileWriter; | 148 Persistent<FileWriterBase> m_fileWriter; |
| 149 Persistent<FileWriterBaseCallback> m_successCallback; | 149 Persistent<FileWriterBaseCallback> m_successCallback; |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 class SnapshotFileCallback final : public FileSystemCallbacksBase { | 152 class SnapshotFileCallback final : public FileSystemCallbacksBase { |
| 153 public: | 153 public: |
| 154 static PassOwnPtr<AsyncFileSystemCallbacks> create(DOMFileSystemBase*, const
String& name, const KURL&, FileCallback*, ErrorCallback*, ExecutionContext*); | 154 static PassOwnPtr<AsyncFileSystemCallbacks> create(DOMFileSystemBase*, const
String& name, const KURL&, BlobCallback*, ErrorCallback*, ExecutionContext*); |
| 155 virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataH
andle> snapshot); | 155 virtual void didCreateSnapshotFile(const FileMetadata&, PassRefPtr<BlobDataH
andle> snapshot); |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 SnapshotFileCallback(DOMFileSystemBase*, const String& name, const KURL&, Fi
leCallback*, ErrorCallback*, ExecutionContext*); | 158 SnapshotFileCallback(DOMFileSystemBase*, const String& name, const KURL&, Bl
obCallback*, ErrorCallback*, ExecutionContext*); |
| 159 String m_name; | 159 String m_name; |
| 160 KURL m_url; | 160 KURL m_url; |
| 161 Persistent<FileCallback> m_successCallback; | 161 Persistent<BlobCallback> m_successCallback; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 class VoidCallbacks final : public FileSystemCallbacksBase { | 164 class VoidCallbacks final : public FileSystemCallbacksBase { |
| 165 public: | 165 public: |
| 166 static PassOwnPtr<AsyncFileSystemCallbacks> create(VoidCallback*, ErrorCallb
ack*, ExecutionContext*, DOMFileSystemBase*); | 166 static PassOwnPtr<AsyncFileSystemCallbacks> create(VoidCallback*, ErrorCallb
ack*, ExecutionContext*, DOMFileSystemBase*); |
| 167 void didSucceed() override; | 167 void didSucceed() override; |
| 168 | 168 |
| 169 private: | 169 private: |
| 170 VoidCallbacks(VoidCallback*, ErrorCallback*, ExecutionContext*, DOMFileSyste
mBase*); | 170 VoidCallbacks(VoidCallback*, ErrorCallback*, ExecutionContext*, DOMFileSyste
mBase*); |
| 171 Persistent<VoidCallback> m_successCallback; | 171 Persistent<VoidCallback> m_successCallback; |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| 175 | 175 |
| 176 #endif // FileSystemCallbacks_h | 176 #endif // FileSystemCallbacks_h |
| OLD | NEW |