diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-27 15:51:00 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-27 15:51:00 +0000 |
commit | 922f25039d939159501fad266518290b2c05fe2a (patch) | |
tree | 82f23eaa36a8d86f86d86b7f8aa85c487629057d /content/browser/mojo | |
parent | bcbdd98cc4d033b29fa633cbc1c81599ba6d9977 (diff) | |
download | chromium_src-922f25039d939159501fad266518290b2c05fe2a.zip chromium_src-922f25039d939159501fad266518290b2c05fe2a.tar.gz chromium_src-922f25039d939159501fad266518290b2c05fe2a.tar.bz2 |
Change Shell / ShellClient to ServiceProvider
BUG=
R=darin@chromium.org
Review URL: https://codereview.chromium.org/298653010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272983 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/mojo')
-rw-r--r-- | content/browser/mojo/mojo_application_host.cc | 7 | ||||
-rw-r--r-- | content/browser/mojo/mojo_application_host.h | 20 |
2 files changed, 15 insertions, 12 deletions
diff --git a/content/browser/mojo/mojo_application_host.cc b/content/browser/mojo/mojo_application_host.cc index 25b63d5..0825647 100644 --- a/content/browser/mojo/mojo_application_host.cc +++ b/content/browser/mojo/mojo_application_host.cc @@ -30,7 +30,7 @@ MojoApplicationHost::~MojoApplicationHost() { } bool MojoApplicationHost::Init() { - DCHECK(!shell_.get()) << "Already initialized!"; + DCHECK(!child_service_provider_.get()) << "Already initialized!"; mojo::embedder::PlatformChannelPair channel_pair; @@ -43,7 +43,8 @@ bool MojoApplicationHost::Init() { // Forward this to the client once we know its process handle. client_handle_ = channel_pair.PassClientHandle(); - shell_.reset(BindToPipe(new ShellImpl(), message_pipe.Pass())); + child_service_provider_.reset( + BindToPipe(new ServiceProviderImpl(), message_pipe.Pass())); return true; } @@ -59,7 +60,7 @@ bool MojoApplicationHost::Activate(IPC::Sender* sender, return did_activate_; } -void MojoApplicationHost::ShellImpl::Connect( +void MojoApplicationHost::ServiceProviderImpl::ConnectToService( const mojo::String& url, mojo::ScopedMessagePipeHandle handle) { // TODO(darin): Provide something meaningful here. diff --git a/content/browser/mojo/mojo_application_host.h b/content/browser/mojo/mojo_application_host.h index d9c61a5..84d350d 100644 --- a/content/browser/mojo/mojo_application_host.h +++ b/content/browser/mojo/mojo_application_host.h @@ -8,7 +8,7 @@ #include "base/process/process_handle.h" #include "mojo/common/channel_init.h" #include "mojo/embedder/scoped_platform_handle.h" -#include "mojo/public/interfaces/shell/shell.mojom.h" +#include "mojo/public/interfaces/service_provider/service_provider.mojom.h" namespace IPC { class Sender; @@ -34,27 +34,29 @@ class MojoApplicationHost { bool did_activate() const { return did_activate_; } - mojo::ShellClient* shell_client() { - DCHECK(shell_.get()); - return shell_->client(); + mojo::ServiceProvider* service_provider() { + DCHECK(child_service_provider_.get()); + return child_service_provider_->client(); } private: - class ShellImpl : public mojo::InterfaceImpl<mojo::Shell> { + class ServiceProviderImpl + : public mojo::InterfaceImpl<mojo::ServiceProvider> { public: virtual void OnConnectionError() OVERRIDE { // TODO(darin): How should we handle this error? } - // mojo::Shell methods: - virtual void Connect(const mojo::String& url, - mojo::ScopedMessagePipeHandle handle) OVERRIDE; + // mojo::ServiceProvider methods: + virtual void ConnectToService( + const mojo::String& url, + mojo::ScopedMessagePipeHandle handle) OVERRIDE; }; mojo::common::ChannelInit channel_init_; mojo::embedder::ScopedPlatformHandle client_handle_; - scoped_ptr<ShellImpl> shell_; + scoped_ptr<ServiceProviderImpl> child_service_provider_; bool did_activate_; |