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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 Persistent<HelperType> m_helper; | 122 Persistent<HelperType> m_helper; |
123 }; | 123 }; |
124 | 124 |
125 class ErrorCallbackImpl final : public ErrorCallback { | 125 class ErrorCallbackImpl final : public ErrorCallback { |
126 public: | 126 public: |
127 static ErrorCallbackImpl* create(HelperType* helper) | 127 static ErrorCallbackImpl* create(HelperType* helper) |
128 { | 128 { |
129 return new ErrorCallbackImpl(helper); | 129 return new ErrorCallbackImpl(helper); |
130 } | 130 } |
131 | 131 |
132 virtual void handleEvent(FileError* error) override | 132 void handleEvent(FileError* error) override |
133 { | 133 { |
134 ASSERT(error); | 134 ASSERT(error); |
135 m_helper->setError(error->code()); | 135 m_helper->setError(error->code()); |
136 } | 136 } |
137 | 137 |
138 private: | 138 private: |
139 explicit ErrorCallbackImpl(HelperType* helper) | 139 explicit ErrorCallbackImpl(HelperType* helper) |
140 : m_helper(helper) | 140 : m_helper(helper) |
141 { | 141 { |
142 } | 142 } |
(...skipping 27 matching lines...) Expand all 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 |