diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-04 18:29:48 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-04 18:29:48 +0000 |
commit | d656e1042e3bc0cbe3f35ab34a193904763a2f8b (patch) | |
tree | d2e58c6bf158c53250928265f9c061745e7f84b3 /mojo/shell | |
parent | ecc5f2ed558344ab1fa0b0e0c3b97395a50cad03 (diff) | |
download | chromium_src-d656e1042e3bc0cbe3f35ab34a193904763a2f8b.zip chromium_src-d656e1042e3bc0cbe3f35ab34a193904763a2f8b.tar.gz chromium_src-d656e1042e3bc0cbe3f35ab34a193904763a2f8b.tar.bz2 |
Add ServiceManager::GetInstance() and change ServiceManager::Loader to ServiceLoader
BUG=None
TESTS=Existing
R=darin@chromium.org, darin
Review URL: https://codereview.chromium.org/185553012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/shell')
-rw-r--r-- | mojo/shell/android/mojo_main.cc | 8 | ||||
-rw-r--r-- | mojo/shell/dynamic_service_loader.cc | 5 | ||||
-rw-r--r-- | mojo/shell/dynamic_service_loader.h | 9 |
3 files changed, 13 insertions, 9 deletions
diff --git a/mojo/shell/android/mojo_main.cc b/mojo/shell/android/mojo_main.cc index 987cdfd..55fa8111 100644 --- a/mojo/shell/android/mojo_main.cc +++ b/mojo/shell/android/mojo_main.cc @@ -13,6 +13,7 @@ #include "base/message_loop/message_loop.h" #include "jni/MojoMain_jni.h" #include "mojo/public/shell/application.h" +#include "mojo/service_manager/service_loader.h" #include "mojo/service_manager/service_manager.h" #include "mojo/services/native_viewport/native_viewport_service.h" #include "mojo/shell/context.h" @@ -32,14 +33,15 @@ LazyInstance<scoped_ptr<base::MessageLoop> > g_java_message_loop = LazyInstance<scoped_ptr<shell::Context> > g_context = LAZY_INSTANCE_INITIALIZER; -class NativeViewportServiceLoader : public shell::ServiceManager::Loader { +class NativeViewportServiceLoader : public ServiceLoader { public: NativeViewportServiceLoader() {} virtual ~NativeViewportServiceLoader() {} private: - virtual void Load(const GURL& url, - ScopedShellHandle service_handle) + virtual void LoadService(ServiceManager* manager, + const GURL& url, + ScopedShellHandle service_handle) MOJO_OVERRIDE { app_.reset(CreateNativeViewportService(g_context.Get().get(), service_handle.Pass())); diff --git a/mojo/shell/dynamic_service_loader.cc b/mojo/shell/dynamic_service_loader.cc index 4168fdf..7d5e8a4 100644 --- a/mojo/shell/dynamic_service_loader.cc +++ b/mojo/shell/dynamic_service_loader.cc @@ -130,8 +130,9 @@ DynamicServiceLoader::~DynamicServiceLoader() { DCHECK(url_to_load_context_.empty()); } -void DynamicServiceLoader::Load(const GURL& url, - ScopedShellHandle service_handle) { +void DynamicServiceLoader::LoadService(ServiceManager* manager, + const GURL& url, + ScopedShellHandle service_handle) { DCHECK(url_to_load_context_.find(url) == url_to_load_context_.end()); url_to_load_context_[url] = new LoadContext(this, url, service_handle.Pass()); } diff --git a/mojo/shell/dynamic_service_loader.h b/mojo/shell/dynamic_service_loader.h index 7337e53..b6bd3c5 100644 --- a/mojo/shell/dynamic_service_loader.h +++ b/mojo/shell/dynamic_service_loader.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "mojo/public/shell/shell.mojom.h" #include "mojo/public/system/core_cpp.h" -#include "mojo/service_manager/service_manager.h" +#include "mojo/service_manager/service_loader.h" #include "mojo/shell/keep_alive.h" #include "url/gurl.h" @@ -21,7 +21,7 @@ class Context; // A subclass of ServiceManager::Loader that loads a dynamic library containing // the implementation of the service. -class DynamicServiceLoader : public ServiceManager::Loader { +class DynamicServiceLoader : public ServiceLoader { public: explicit DynamicServiceLoader(Context* context); virtual ~DynamicServiceLoader(); @@ -30,8 +30,9 @@ class DynamicServiceLoader : public ServiceManager::Loader { // specified will be modified to the platform's naming scheme. Also the // value specified to the --origin command line argument will be used as the // host / port. - virtual void Load(const GURL& url, - ScopedShellHandle service_handle) MOJO_OVERRIDE; + virtual void LoadService(ServiceManager* manager, + const GURL& url, + ScopedShellHandle service_handle) MOJO_OVERRIDE; private: class LoadContext; |