Index: components/nacl/renderer/trusted_plugin_channel.h |
diff --git a/components/nacl/renderer/trusted_plugin_channel.h b/components/nacl/renderer/trusted_plugin_channel.h |
index bcc2e7e3adac39bebb78c6387e061fb3fbbcf430..858279b304d2c413191400800f69d98dbd8fb398 100644 |
--- a/components/nacl/renderer/trusted_plugin_channel.h |
+++ b/components/nacl/renderer/trusted_plugin_channel.h |
@@ -9,46 +9,37 @@ |
#include "base/callback.h" |
#include "base/macros.h" |
-#include "ipc/ipc_listener.h" |
+#include "components/nacl/common/nacl.mojom.h" |
+#include "mojo/public/cpp/bindings/binding.h" |
#include "native_client/src/trusted/service_runtime/nacl_error_code.h" |
#include "ppapi/c/pp_instance.h" |
-namespace base { |
-class WaitableEvent; |
-} // namespace base |
- |
-namespace IPC { |
-struct ChannelHandle; |
-class Message; |
-class SyncChannel; |
-} // namespace IPC |
- |
namespace nacl { |
class NexeLoadManager; |
-class TrustedPluginChannel : public IPC::Listener { |
+class TrustedPluginChannel : public mojom::NaClRendererHost { |
public: |
TrustedPluginChannel(NexeLoadManager* nexe_load_manager, |
- const IPC::ChannelHandle& handle, |
- base::WaitableEvent* shutdown_event, |
+ mojom::NaClRendererHostRequest request, |
bool is_helper_nexe); |
~TrustedPluginChannel() override; |
- bool Send(IPC::Message* message); |
- |
- // Listener implementation. |
- bool OnMessageReceived(const IPC::Message& message) override; |
- void OnChannelError() override; |
+ private: |
+ void OnChannelError(); |
- void OnReportExitStatus(int exit_status); |
- void OnReportLoadStatus(NaClErrorCode load_status); |
+ // mojom::NaClRendererHost overrides. |
+ void ReportExitStatus(int exit_status, |
+ const ReportExitStatusCallback& callback) override; |
+ void ReportLoadStatus(NaClErrorCode load_status, |
+ const ReportLoadStatusCallback& callback) override; |
+ void ProvideExitControl(mojom::NaClExitControlPtr exit_control) override; |
- private: |
// Non-owning pointer. This is safe because the TrustedPluginChannel is owned |
// by the NexeLoadManager pointed to here. |
NexeLoadManager* nexe_load_manager_; |
- std::unique_ptr<IPC::SyncChannel> channel_; |
- bool is_helper_nexe_; |
+ mojo::Binding<mojom::NaClRendererHost> binding_; |
+ mojom::NaClExitControlPtr exit_control_; |
+ const bool is_helper_nexe_; |
DISALLOW_COPY_AND_ASSIGN(TrustedPluginChannel); |
}; |