#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "ipc/ipc_listener.h"
+#include "ppapi/c/pp_instance.h"
namespace base {
class WaitableEvent;
} // namespace IPC
namespace nacl {
+class NexeLoadManager;
class TrustedPluginChannel : public IPC::Listener {
public:
- TrustedPluginChannel(
- const IPC::ChannelHandle& handle,
- const base::Callback<void(int32_t)>& connected_callback,
- base::WaitableEvent* waitable_event);
+ TrustedPluginChannel(NexeLoadManager* nexe_load_manager,
+ const IPC::ChannelHandle& handle,
+ base::WaitableEvent* shutdown_event,
+ bool report_exit_status);
virtual ~TrustedPluginChannel();
bool Send(IPC::Message* message);
// Listener implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
virtual void OnChannelError() OVERRIDE;
+ void OnReportExitStatus(int exit_status);
+
private:
- base::Callback<void(int32_t)> connected_callback_;
+ // Non-owning pointer. This is safe because the TrustedPluginChannel is owned
+ // by the NexeLoadManager pointed to here.
+ NexeLoadManager* nexe_load_manager_;
scoped_ptr<IPC::SyncChannel> channel_;
+ bool report_exit_status_;
DISALLOW_COPY_AND_ASSIGN(TrustedPluginChannel);
};