2010-01-20 03:13:24 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=8 et :
|
|
|
|
*/
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-01-20 03:13:24 +00:00
|
|
|
|
|
|
|
#ifndef mozilla_plugins_ChildAsyncCall_h
|
|
|
|
#define mozilla_plugins_ChildAsyncCall_h
|
|
|
|
|
|
|
|
#include "PluginMessageUtils.h"
|
2010-02-03 22:17:09 +00:00
|
|
|
#include "base/task.h"
|
2010-01-20 03:13:24 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace plugins {
|
|
|
|
|
|
|
|
typedef void (*PluginThreadCallback)(void*);
|
|
|
|
|
|
|
|
class PluginInstanceChild;
|
|
|
|
|
2010-02-03 22:17:09 +00:00
|
|
|
class ChildAsyncCall : public CancelableTask
|
2010-01-20 03:13:24 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ChildAsyncCall(PluginInstanceChild* instance,
|
|
|
|
PluginThreadCallback aFunc, void* aUserData);
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
void Run() override;
|
|
|
|
void Cancel() override;
|
2010-04-26 16:29:11 +00:00
|
|
|
|
|
|
|
protected:
|
2010-01-20 03:13:24 +00:00
|
|
|
PluginInstanceChild* mInstance;
|
|
|
|
PluginThreadCallback mFunc;
|
|
|
|
void* mData;
|
2010-04-26 16:29:11 +00:00
|
|
|
|
|
|
|
void RemoveFromAsyncList();
|
2010-01-20 03:13:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace plugins
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_plugins_ChildAsyncCall_h
|