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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "modules/filesystem/ErrorCallback.h" | 42 #include "modules/filesystem/ErrorCallback.h" |
43 #include "modules/filesystem/FileEntry.h" | 43 #include "modules/filesystem/FileEntry.h" |
44 #include "modules/filesystem/FileSystemCallback.h" | 44 #include "modules/filesystem/FileSystemCallback.h" |
45 #include "modules/filesystem/MetadataCallback.h" | 45 #include "modules/filesystem/MetadataCallback.h" |
46 #include "platform/heap/Handle.h" | 46 #include "platform/heap/Handle.h" |
47 | 47 |
48 namespace blink { | 48 namespace blink { |
49 | 49 |
50 template <typename ResultType, typename CallbackArg> | 50 template <typename ResultType, typename CallbackArg> |
51 struct HelperResultType { | 51 struct HelperResultType { |
52 DISALLOW_ALLOCATION(); | 52 DISALLOW_NEW(); |
53 public: | 53 public: |
54 typedef ResultType* ReturnType; | 54 typedef ResultType* ReturnType; |
55 typedef Member<ResultType> StorageType; | 55 typedef Member<ResultType> StorageType; |
56 | 56 |
57 static ReturnType createFromCallbackArg(CallbackArg argument) | 57 static ReturnType createFromCallbackArg(CallbackArg argument) |
58 { | 58 { |
59 return ResultType::create(argument); | 59 return ResultType::create(argument); |
60 } | 60 } |
61 }; | 61 }; |
62 | 62 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 }; | 170 }; |
171 | 171 |
172 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe
lper; | 172 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe
lper; |
173 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa
llbackHelper; | 173 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa
llbackHelper; |
174 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback
Helper; | 174 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback
Helper; |
175 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync
> FileSystemSyncCallbackHelper; | 175 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync
> FileSystemSyncCallbackHelper; |
176 | 176 |
177 } // namespace blink | 177 } // namespace blink |
178 | 178 |
179 #endif // SyncCallbackHelper_h | 179 #endif // SyncCallbackHelper_h |
OLD | NEW |