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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 { | 100 { |
101 scheduleCallback(executionContext(), callback, callbackArg); | 101 scheduleCallback(executionContext(), callback, callbackArg); |
102 } | 102 } |
103 | 103 |
104 template <typename CB, typename CBArg> | 104 template <typename CB, typename CBArg> |
105 void scheduleCallback(CB* callback, const CBArg& callbackArg) | 105 void scheduleCallback(CB* callback, const CBArg& callbackArg) |
106 { | 106 { |
107 scheduleCallback(executionContext(), callback, callbackArg); | 107 scheduleCallback(executionContext(), callback, callbackArg); |
108 } | 108 } |
109 | 109 |
110 virtual void trace(Visitor*) override; | 110 DECLARE_VIRTUAL_TRACE(); |
111 | 111 |
112 private: | 112 private: |
113 DOMFileSystem(ExecutionContext*, const String& name, FileSystemType, const K
URL& rootURL); | 113 DOMFileSystem(ExecutionContext*, const String& name, FileSystemType, const K
URL& rootURL); |
114 | 114 |
115 class DispatchCallbackTaskBase : public ExecutionContextTask { | 115 class DispatchCallbackTaskBase : public ExecutionContextTask { |
116 public: | 116 public: |
117 virtual String taskNameForInstrumentation() const override | 117 virtual String taskNameForInstrumentation() const override |
118 { | 118 { |
119 return "FileSystem"; | 119 return "FileSystem"; |
120 } | 120 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback) | 242 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
lback) |
243 { | 243 { |
244 ASSERT(executionContext->isContextThread()); | 244 ASSERT(executionContext->isContextThread()); |
245 if (callback) | 245 if (callback) |
246 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNoArg
Task<CB>(callback))); | 246 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNoArg
Task<CB>(callback))); |
247 } | 247 } |
248 | 248 |
249 } // namespace blink | 249 } // namespace blink |
250 | 250 |
251 #endif // DOMFileSystem_h | 251 #endif // DOMFileSystem_h |
OLD | NEW |