Index: content/browser/mojo/mojo_application_host.h |
diff --git a/content/browser/mojo/mojo_application_host.h b/content/browser/mojo/mojo_application_host.h |
index 68f6c3208b8a379d6926e1a62f38054df65cef2d..3758d97fc5bb00afc59f01ea2512a9c516d33e68 100644 |
--- a/content/browser/mojo/mojo_application_host.h |
+++ b/content/browser/mojo/mojo_application_host.h |
@@ -8,7 +8,6 @@ |
#include "base/process/process_handle.h" |
#include "mojo/common/channel_init.h" |
#include "mojo/embedder/scoped_platform_handle.h" |
-#include "mojo/public/cpp/bindings/remote_ptr.h" |
#include "mojo/public/interfaces/shell/shell.mojom.h" |
namespace IPC { |
@@ -35,12 +34,29 @@ class MojoApplicationHost { |
bool did_activate() const { return did_activate_; } |
- mojo::ShellClient* shell_client() { return shell_client_.get(); } |
+ mojo::ShellClient* shell_client() { return shell_impl_->client(); } |
private: |
+ class ShellImpl : public mojo::Shell { |
+ public: |
+ ShellImpl() : client_(NULL) {} |
+ mojo::ShellClient* client() { return client_; } |
+ |
+ // mojo::Shell methods: |
+ virtual void SetClient(mojo::ShellClient* client) OVERRIDE; |
+ virtual void Connect(const mojo::String& url, |
+ mojo::ScopedMessagePipeHandle handle) OVERRIDE; |
+ private: |
+ mojo::ShellClient* client_; |
+ }; |
+ |
mojo::common::ChannelInit channel_init_; |
mojo::embedder::ScopedPlatformHandle client_handle_; |
- mojo::RemotePtr<mojo::ShellClient> shell_client_; |
+ |
+ // shell_impl_ is bound to the lifetime of shell_. |
+ mojo::ShellPtr shell_; |
+ ShellImpl* shell_impl_; |
+ |
bool did_activate_; |
DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost); |