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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 int m_numberOfPendingCallbacks; | 170 int m_numberOfPendingCallbacks; |
171 Member<DirectoryEntry> m_rootEntry; | 171 Member<DirectoryEntry> m_rootEntry; |
172 }; | 172 }; |
173 | 173 |
174 template <typename CB, typename CBArg> | 174 template <typename CB, typename CBArg> |
175 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback, CBArg* arg) | 175 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback, CBArg* arg) |
176 { | 176 { |
177 ASSERT(executionContext->isContextThread()); | 177 ASSERT(executionContext->isContextThread()); |
178 if (callback) | 178 if (callback) |
179 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackPtrAr
gTask<CB, CBArg>(callback, arg))); | 179 executionContext->postTask(BLINK_FROM_HERE, adoptPtr(new DispatchCallbac
kPtrArgTask<CB, CBArg>(callback, arg))); |
180 } | 180 } |
181 | 181 |
182 template <typename CB, typename CBArg> | 182 template <typename CB, typename CBArg> |
183 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback, const HeapVector<CBArg>& arg) | 183 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback, const HeapVector<CBArg>& arg) |
184 { | 184 { |
185 ASSERT(executionContext->isContextThread()); | 185 ASSERT(executionContext->isContextThread()); |
186 if (callback) | 186 if (callback) |
187 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNonPt
rArgTask<CB, PersistentHeapVector<CBArg>>(callback, arg))); | 187 executionContext->postTask(BLINK_FROM_HERE, adoptPtr(new DispatchCallbac
kNonPtrArgTask<CB, PersistentHeapVector<CBArg>>(callback, arg))); |
188 } | 188 } |
189 | 189 |
190 template <typename CB, typename CBArg> | 190 template <typename CB, typename CBArg> |
191 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback, const CBArg& arg) | 191 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback, const CBArg& arg) |
192 { | 192 { |
193 ASSERT(executionContext->isContextThread()); | 193 ASSERT(executionContext->isContextThread()); |
194 if (callback) | 194 if (callback) |
195 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNonPt
rArgTask<CB, CBArg>(callback, arg))); | 195 executionContext->postTask(BLINK_FROM_HERE, adoptPtr(new DispatchCallbac
kNonPtrArgTask<CB, CBArg>(callback, arg))); |
196 } | 196 } |
197 | 197 |
198 template <typename CB, typename CBArg> | 198 template <typename CB, typename CBArg> |
199 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback, const Member<CBArg>& arg) | 199 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback, const Member<CBArg>& arg) |
200 { | 200 { |
201 ASSERT(executionContext->isContextThread()); | 201 ASSERT(executionContext->isContextThread()); |
202 if (callback) | 202 if (callback) |
203 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNonPt
rArgTask<CB, Persistent<CBArg>>(callback, arg))); | 203 executionContext->postTask(BLINK_FROM_HERE, adoptPtr(new DispatchCallbac
kNonPtrArgTask<CB, Persistent<CBArg>>(callback, arg))); |
204 } | 204 } |
205 | 205 |
206 template <typename CB> | 206 template <typename CB> |
207 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback) | 207 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback) |
208 { | 208 { |
209 ASSERT(executionContext->isContextThread()); | 209 ASSERT(executionContext->isContextThread()); |
210 if (callback) | 210 if (callback) |
211 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNoArg
Task<CB>(callback))); | 211 executionContext->postTask(BLINK_FROM_HERE, adoptPtr(new DispatchCallbac
kNoArgTask<CB>(callback))); |
212 } | 212 } |
213 | 213 |
214 } // namespace blink | 214 } // namespace blink |
215 | 215 |
216 #endif // DOMFileSystem_h | 216 #endif // DOMFileSystem_h |
OLD | NEW |