michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=8 et : michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_plugins_ChildAsyncCall_h michael@0: #define mozilla_plugins_ChildAsyncCall_h michael@0: michael@0: #include "PluginMessageUtils.h" michael@0: #include "base/task.h" michael@0: michael@0: namespace mozilla { michael@0: namespace plugins { michael@0: michael@0: typedef void (*PluginThreadCallback)(void*); michael@0: michael@0: class PluginInstanceChild; michael@0: michael@0: class ChildAsyncCall : public CancelableTask michael@0: { michael@0: public: michael@0: ChildAsyncCall(PluginInstanceChild* instance, michael@0: PluginThreadCallback aFunc, void* aUserData); michael@0: michael@0: void Run() MOZ_OVERRIDE; michael@0: void Cancel() MOZ_OVERRIDE; michael@0: michael@0: protected: michael@0: PluginInstanceChild* mInstance; michael@0: PluginThreadCallback mFunc; michael@0: void* mData; michael@0: michael@0: void RemoveFromAsyncList(); michael@0: }; michael@0: michael@0: } // namespace plugins michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_plugins_ChildAsyncCall_h