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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 template <typename CB, typename CBArg> | 84 template <typename CB, typename CBArg> |
85 static void scheduleCallback(ExecutionContext*, CB*, const Member<CBArg>&); | 85 static void scheduleCallback(ExecutionContext*, CB*, const Member<CBArg>&); |
86 | 86 |
87 template <typename CB> | 87 template <typename CB> |
88 static void scheduleCallback(ExecutionContext*, CB*); | 88 static void scheduleCallback(ExecutionContext*, CB*); |
89 | 89 |
90 template <typename CB, typename CBArg> | 90 template <typename CB, typename CBArg> |
91 void scheduleCallback(CB* callback, CBArg* callbackArg) | 91 void scheduleCallback(CB* callback, CBArg* callbackArg) |
92 { | 92 { |
93 scheduleCallback(executionContext(), callback, callbackArg); | 93 scheduleCallback(getExecutionContext(), callback, callbackArg); |
94 } | 94 } |
95 | 95 |
96 template <typename CB, typename CBArg> | 96 template <typename CB, typename CBArg> |
97 void scheduleCallback(CB* callback, const CBArg& callbackArg) | 97 void scheduleCallback(CB* callback, const CBArg& callbackArg) |
98 { | 98 { |
99 scheduleCallback(executionContext(), callback, callbackArg); | 99 scheduleCallback(getExecutionContext(), callback, callbackArg); |
100 } | 100 } |
101 | 101 |
102 DECLARE_VIRTUAL_TRACE(); | 102 DECLARE_VIRTUAL_TRACE(); |
103 | 103 |
104 private: | 104 private: |
105 DOMFileSystem(ExecutionContext*, const String& name, FileSystemType, const K
URL& rootURL); | 105 DOMFileSystem(ExecutionContext*, const String& name, FileSystemType, const K
URL& rootURL); |
106 | 106 |
107 class DispatchCallbackTaskBase : public ExecutionContextTask { | 107 class DispatchCallbackTaskBase : public ExecutionContextTask { |
108 public: | 108 public: |
109 String taskNameForInstrumentation() const override | 109 String taskNameForInstrumentation() const override |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(BLINK_FROM_HERE, adoptPtr(new DispatchCallbac
kNoArgTask<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 |