class FileWriterCallback;
class DOMFileSystem FINAL : public DOMFileSystemBase, public ScriptWrappable, public ActiveDOMObject {
+ DEFINE_WRAPPERTYPEINFO();
public:
static DOMFileSystem* create(ExecutionContext*, const String& name, FileSystemType, const KURL& rootURL);
// DOMFileSystemBase overrides.
virtual void addPendingCallbacks() OVERRIDE;
virtual void removePendingCallbacks() OVERRIDE;
- virtual void reportError(PassOwnPtr<ErrorCallback>, PassRefPtrWillBeRawPtr<FileError>) OVERRIDE;
+ virtual void reportError(ErrorCallback*, PassRefPtrWillBeRawPtr<FileError>) OVERRIDE;
// ActiveDOMObject overrides.
virtual bool hasPendingActivity() const OVERRIDE;
- void createWriter(const FileEntry*, PassOwnPtr<FileWriterCallback>, PassOwnPtr<ErrorCallback>);
- void createFile(const FileEntry*, PassOwnPtr<FileCallback>, PassOwnPtr<ErrorCallback>);
+ void createWriter(const FileEntry*, FileWriterCallback*, ErrorCallback*);
+ void createFile(const FileEntry*, FileCallback*, ErrorCallback*);
// Schedule a callback. This should not cross threads (should be called on the same context thread).
// FIXME: move this to a more generic place.
template <typename CB, typename CBArg>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>, PassRefPtrWillBeRawPtr<CBArg>);
+ static void scheduleCallback(ExecutionContext*, CB*, PassRefPtrWillBeRawPtr<CBArg>);
template <typename CB, typename CBArg>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>, CBArg*);
+ static void scheduleCallback(ExecutionContext*, CB*, CBArg*);
template <typename CB, typename CBArg>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>, const HeapVector<CBArg>&);
+ static void scheduleCallback(ExecutionContext*, CB*, const HeapVector<CBArg>&);
template <typename CB, typename CBArg>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>, const CBArg&);
+ static void scheduleCallback(ExecutionContext*, CB*, const CBArg&);
template <typename CB>
- static void scheduleCallback(ExecutionContext*, PassOwnPtr<CB>);
+ static void scheduleCallback(ExecutionContext*, CB*);
template <typename CB, typename CBArg>
- void scheduleCallback(PassOwnPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> callbackArg)
+ void scheduleCallback(CB* callback, PassRefPtrWillBeRawPtr<CBArg> callbackArg)
{
scheduleCallback(executionContext(), callback, callbackArg);
}
template <typename CB, typename CBArg>
- void scheduleCallback(PassOwnPtr<CB> callback, CBArg* callbackArg)
+ void scheduleCallback(CB* callback, CBArg* callbackArg)
{
scheduleCallback(executionContext(), callback, callbackArg);
}
template <typename CB, typename CBArg>
- void scheduleCallback(PassOwnPtr<CB> callback, const CBArg& callbackArg)
+ void scheduleCallback(CB* callback, const CBArg& callbackArg)
{
scheduleCallback(executionContext(), callback, callbackArg);
}
template <typename CB, typename CBArg>
class DispatchCallbackRefPtrArgTask FINAL : public DispatchCallbackTaskBase {
public:
- DispatchCallbackRefPtrArgTask(PassOwnPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> arg)
+ DispatchCallbackRefPtrArgTask(CB* callback, PassRefPtrWillBeRawPtr<CBArg> arg)
: m_callback(callback)
, m_callbackArg(arg)
{
}
private:
- OwnPtr<CB> m_callback;
+ Persistent<CB> m_callback;
RefPtrWillBePersistent<CBArg> m_callbackArg;
};
template <typename CB, typename CBArg>
class DispatchCallbackPtrArgTask FINAL : public DispatchCallbackTaskBase {
public:
- DispatchCallbackPtrArgTask(PassOwnPtr<CB> callback, CBArg* arg)
+ DispatchCallbackPtrArgTask(CB* callback, CBArg* arg)
: m_callback(callback)
, m_callbackArg(arg)
{
}
private:
- OwnPtr<CB> m_callback;
+ Persistent<CB> m_callback;
Persistent<CBArg> m_callbackArg;
};
template <typename CB, typename CBArg>
class DispatchCallbackNonPtrArgTask FINAL : public DispatchCallbackTaskBase {
public:
- DispatchCallbackNonPtrArgTask(PassOwnPtr<CB> callback, const CBArg& arg)
+ DispatchCallbackNonPtrArgTask(CB* callback, const CBArg& arg)
: m_callback(callback)
, m_callbackArg(arg)
{
}
private:
- OwnPtr<CB> m_callback;
+ Persistent<CB> m_callback;
CBArg m_callbackArg;
};
template <typename CB>
class DispatchCallbackNoArgTask FINAL : public DispatchCallbackTaskBase {
public:
- DispatchCallbackNoArgTask(PassOwnPtr<CB> callback)
+ DispatchCallbackNoArgTask(CB* callback)
: m_callback(callback)
{
}
}
private:
- OwnPtr<CB> m_callback;
+ Persistent<CB> m_callback;
};
int m_numberOfPendingCallbacks;
};
template <typename CB, typename CBArg>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback, PassRefPtrWillBeRawPtr<CBArg> arg)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* callback, PassRefPtrWillBeRawPtr<CBArg> arg)
{
ASSERT(executionContext->isContextThread());
if (callback)
}
template <typename CB, typename CBArg>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback, CBArg* arg)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* callback, CBArg* arg)
{
ASSERT(executionContext->isContextThread());
if (callback)
}
template <typename CB, typename CBArg>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback, const HeapVector<CBArg>& arg)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* callback, const HeapVector<CBArg>& arg)
{
ASSERT(executionContext->isContextThread());
if (callback)
}
template <typename CB, typename CBArg>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback, const CBArg& arg)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* callback, const CBArg& arg)
{
ASSERT(executionContext->isContextThread());
if (callback)
}
template <typename CB>
-void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, PassOwnPtr<CB> callback)
+void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* callback)
{
ASSERT(executionContext->isContextThread());
if (callback)
executionContext->postTask(adoptPtr(new DispatchCallbackNoArgTask<CB>(callback)));
}
-} // namespace
+} // namespace blink
#endif // DOMFileSystem_h