Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: components/nacl/renderer/trusted_plugin_channel.h

Issue 2590173002: Convert NaCl renderer-loader messages to mojo. (Closed)
Patch Set: GetProxy() -> MakeRequest() Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698