| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #ifndef SyncCallbackHelper_h | 32 #ifndef SyncCallbackHelper_h |
| 33 #define SyncCallbackHelper_h | 33 #define SyncCallbackHelper_h |
| 34 | 34 |
| 35 #include "bindings/v8/ExceptionState.h" | 35 #include "bindings/v8/ExceptionState.h" |
| 36 #include "core/fileapi/FileError.h" | 36 #include "core/fileapi/FileError.h" |
| 37 #include "core/html/VoidCallback.h" | |
| 38 #include "modules/filesystem/DirectoryEntry.h" | 37 #include "modules/filesystem/DirectoryEntry.h" |
| 39 #include "modules/filesystem/DirectoryReaderSync.h" | 38 #include "modules/filesystem/DirectoryReaderSync.h" |
| 40 #include "modules/filesystem/EntriesCallback.h" | 39 #include "modules/filesystem/EntriesCallback.h" |
| 41 #include "modules/filesystem/EntryCallback.h" | 40 #include "modules/filesystem/EntryCallback.h" |
| 42 #include "modules/filesystem/EntrySync.h" | 41 #include "modules/filesystem/EntrySync.h" |
| 43 #include "modules/filesystem/ErrorCallback.h" | 42 #include "modules/filesystem/ErrorCallback.h" |
| 44 #include "modules/filesystem/FileEntry.h" | 43 #include "modules/filesystem/FileEntry.h" |
| 45 #include "modules/filesystem/FileSystemCallback.h" | 44 #include "modules/filesystem/FileSystemCallback.h" |
| 45 #include "modules/filesystem/FileSystemVoidCallback.h" |
| 46 #include "modules/filesystem/MetadataCallback.h" | 46 #include "modules/filesystem/MetadataCallback.h" |
| 47 #include "wtf/PassRefPtr.h" | 47 #include "wtf/PassRefPtr.h" |
| 48 #include "wtf/RefCounted.h" | 48 #include "wtf/RefCounted.h" |
| 49 | 49 |
| 50 namespace WebCore { | 50 namespace WebCore { |
| 51 | 51 |
| 52 template <typename ResultType, typename CallbackArg> | 52 template <typename ResultType, typename CallbackArg> |
| 53 struct HelperResultType { | 53 struct HelperResultType { |
| 54 typedef PassRefPtr<ResultType> ReturnType; | 54 typedef PassRefPtr<ResultType> ReturnType; |
| 55 typedef RefPtr<ResultType> StorageType; | 55 typedef RefPtr<ResultType> StorageType; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 struct EmptyType : public RefCounted<EmptyType> { | 180 struct EmptyType : public RefCounted<EmptyType> { |
| 181 static PassRefPtr<EmptyType> create(EmptyType*) | 181 static PassRefPtr<EmptyType> create(EmptyType*) |
| 182 { | 182 { |
| 183 return 0; | 183 return 0; |
| 184 } | 184 } |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe
lper; | 187 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe
lper; |
| 188 typedef SyncCallbackHelper<EntriesCallback, const EntryVector&, EntrySyncVector>
EntriesSyncCallbackHelper; | 188 typedef SyncCallbackHelper<EntriesCallback, const EntryVector&, EntrySyncVector>
EntriesSyncCallbackHelper; |
| 189 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa
llbackHelper; | 189 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa
llbackHelper; |
| 190 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback
Helper; | 190 typedef SyncCallbackHelper<FileSystemVoidCallback, EmptyType*, EmptyType> VoidSy
ncCallbackHelper; |
| 191 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync
> FileSystemSyncCallbackHelper; | 191 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync
> FileSystemSyncCallbackHelper; |
| 192 | 192 |
| 193 } // namespace WebCore | 193 } // namespace WebCore |
| 194 | 194 |
| 195 #endif // SyncCallbackHelper_h | 195 #endif // SyncCallbackHelper_h |
| OLD | NEW |