diff options
author | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-30 06:48:53 +0000 |
---|---|---|
committer | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-30 06:48:53 +0000 |
commit | 8c4e8670e876dfacb1ac095af71f670b6639495f (patch) | |
tree | 14eec812c5906543be30ea61ec72db69a2f161d6 /content | |
parent | 45af144330bd2f1345c2433f4f17c95bdcebe2d1 (diff) | |
download | chromium_src-8c4e8670e876dfacb1ac095af71f670b6639495f.zip chromium_src-8c4e8670e876dfacb1ac095af71f670b6639495f.tar.gz chromium_src-8c4e8670e876dfacb1ac095af71f670b6639495f.tar.bz2 |
Mojo: Remove InterfaceProvider.
Review URL: https://codereview.chromium.org/358743002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
28 files changed, 47 insertions, 47 deletions
diff --git a/content/app/BUILD.gn b/content/app/BUILD.gn index 981526f..c8f1370 100644 --- a/content/app/BUILD.gn +++ b/content/app/BUILD.gn @@ -54,7 +54,7 @@ source_set("app") { } else { deps += [ "//mojo/environment:chromium", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//mojo/service_manager", "//mojo/system", ] diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index b7e7286..f067105 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -92,7 +92,7 @@ source_set("browser") { "//cc", "//cc:cc_surfaces", "//mojo/public/cpp/bindings", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//mojo/public/js/bindings", "//net:http_server", "//third_party/icu", diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc index 6f0376a..5331fa8 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc @@ -167,8 +167,8 @@ RenderFrameHostImpl::RenderFrameHostImpl( if (GetProcess()->GetServiceRegistry()) { RenderFrameSetupPtr setup; - GetProcess()->GetServiceRegistry()->GetRemoteInterface(&setup); - mojo::IInterfaceProviderPtr service_provider; + GetProcess()->GetServiceRegistry()->ConnectToRemoteService(&setup); + mojo::ServiceProviderPtr service_provider; setup->GetServiceProviderForFrame(routing_id_, mojo::Get(&service_provider)); service_registry_.BindRemoteServiceProvider( diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn index 6b4e194..07f9238 100644 --- a/content/child/BUILD.gn +++ b/content/child/BUILD.gn @@ -18,7 +18,7 @@ source_set("child") { "//base", "//components/tracing", "//mojo/environment:chromium", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//skia", "//third_party/icu", "//ui/base", diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn index ef286a9..e150f60 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn @@ -56,7 +56,7 @@ source_set("common") { "//gpu/command_buffer/client:gles2_implementation", "//gpu/command_buffer/service", "//gpu/ipc", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//ui/gl", "//webkit/browser:storage", "//webkit/common", diff --git a/content/common/mojo/service_registry_impl.cc b/content/common/mojo/service_registry_impl.cc index d19b96f..15d7cd8 100644 --- a/content/common/mojo/service_registry_impl.cc +++ b/content/common/mojo/service_registry_impl.cc @@ -29,7 +29,7 @@ void ServiceRegistryImpl::BindRemoteServiceProvider( bound_ = true; mojo::BindToPipe(this, handle.Pass()); while (!pending_connects_.empty()) { - client()->GetInterface( + client()->ConnectToService( mojo::String::From(pending_connects_.front().first), mojo::ScopedMessagePipeHandle(pending_connects_.front().second)); pending_connects_.pop(); @@ -52,7 +52,7 @@ void ServiceRegistryImpl::RemoveService(const std::string& service_name) { service_factories_.erase(service_name); } -void ServiceRegistryImpl::GetRemoteInterface( +void ServiceRegistryImpl::ConnectToRemoteService( const base::StringPiece& service_name, mojo::ScopedMessagePipeHandle handle) { if (!bound_) { @@ -60,10 +60,10 @@ void ServiceRegistryImpl::GetRemoteInterface( std::make_pair(service_name.as_string(), handle.release())); return; } - client()->GetInterface(mojo::String::From(service_name), handle.Pass()); + client()->ConnectToService(mojo::String::From(service_name), handle.Pass()); } -void ServiceRegistryImpl::GetInterface( +void ServiceRegistryImpl::ConnectToService( const mojo::String& name, mojo::ScopedMessagePipeHandle client_handle) { std::map<std::string, diff --git a/content/common/mojo/service_registry_impl.h b/content/common/mojo/service_registry_impl.h index 8e60b37..c0dce52 100644 --- a/content/common/mojo/service_registry_impl.h +++ b/content/common/mojo/service_registry_impl.h @@ -14,13 +14,12 @@ #include "content/public/common/service_registry.h" #include "mojo/public/cpp/bindings/interface_impl.h" #include "mojo/public/cpp/system/core.h" -#include "mojo/public/interfaces/interface_provider/interface_provider.mojom.h" +#include "mojo/public/interfaces/service_provider/service_provider.mojom.h" namespace content { -class ServiceRegistryImpl - : public ServiceRegistry, - public mojo::InterfaceImpl<mojo::IInterfaceProvider> { +class ServiceRegistryImpl : public ServiceRegistry, + public mojo::InterfaceImpl<mojo::ServiceProvider> { public: ServiceRegistryImpl(); explicit ServiceRegistryImpl(mojo::ScopedMessagePipeHandle handle); @@ -28,7 +27,7 @@ class ServiceRegistryImpl // Binds to a remote ServiceProvider. This will expose added services to the // remote ServiceProvider with the corresponding handle and enable - // GetInterface to provide access to services exposed by the remote + // ConnectToRemoteService to provide access to services exposed by the remote // ServiceProvider. void BindRemoteServiceProvider(mojo::ScopedMessagePipeHandle handle); @@ -38,13 +37,13 @@ class ServiceRegistryImpl const base::Callback<void(mojo::ScopedMessagePipeHandle)> service_factory) OVERRIDE; virtual void RemoveService(const std::string& service_name) OVERRIDE; - virtual void GetRemoteInterface( + virtual void ConnectToRemoteService( const base::StringPiece& service_name, mojo::ScopedMessagePipeHandle handle) OVERRIDE; private: - // mojo::InterfaceImpl<mojo::IInterfaceProvider> overrides. - virtual void GetInterface( + // mojo::InterfaceImpl<mojo::ServiceProvider> overrides. + virtual void ConnectToService( const mojo::String& name, mojo::ScopedMessagePipeHandle client_handle) OVERRIDE; virtual void OnConnectionError() OVERRIDE; diff --git a/content/common/render_frame_setup.mojom b/content/common/render_frame_setup.mojom index 0315f06..7d108e5 100644 --- a/content/common/render_frame_setup.mojom +++ b/content/common/render_frame_setup.mojom @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import "../../mojo/public/interfaces/interface_provider/interface_provider.mojom" +import "../../mojo/public/interfaces/service_provider/service_provider.mojom" module content { interface RenderFrameSetup { GetServiceProviderForFrame(int32 frame_routing_id, - mojo.IInterfaceProvider& service_provider); + mojo.ServiceProvider& service_provider); }; } diff --git a/content/content_app.gypi b/content/content_app.gypi index d285cc7..fcb98e9 100644 --- a/content/content_app.gypi +++ b/content/content_app.gypi @@ -67,8 +67,8 @@ }, { # OS!="ios" 'dependencies': [ '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', '../mojo/mojo.gyp:mojo_service_manager', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../mojo/mojo.gyp:mojo_system_impl', ], }], diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 50a14a9..cad9647 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -1568,8 +1568,8 @@ '../cc/cc.gyp:cc', '../cc/cc.gyp:cc_surfaces', '../mojo/mojo.gyp:mojo_cpp_bindings', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', '../mojo/mojo.gyp:mojo_js_bindings', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../net/net.gyp:http_server', '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../ui/surface/surface.gyp:surface', diff --git a/content/content_child.gypi b/content/content_child.gypi index 6709bed..3e45b0c 100644 --- a/content/content_child.gypi +++ b/content/content_child.gypi @@ -7,7 +7,7 @@ '../base/base.gyp:base', '../components/tracing.gyp:tracing', '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../skia/skia.gyp:skia', '../ui/base/ui_base.gyp:ui_base', '../ui/gfx/gfx.gyp:gfx', diff --git a/content/content_common.gypi b/content/content_common.gypi index 69a5b79..78878ed 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -546,8 +546,8 @@ '../media/media.gyp:shared_memory_support', '../mojo/mojo.gyp:mojo_cpp_bindings', '../mojo/mojo.gyp:mojo_environment_chromium', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../mojo/mojo.gyp:mojo_system_impl', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', '../third_party/WebKit/public/blink.gyp:blink', '../ui/gl/gl.gyp:gl', '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', diff --git a/content/content_common_mojo_bindings.gypi b/content/content_common_mojo_bindings.gypi index 97c36ac..96b8006 100644 --- a/content/content_common_mojo_bindings.gypi +++ b/content/content_common_mojo_bindings.gypi @@ -10,7 +10,7 @@ 'dependencies': [ '../mojo/mojo.gyp:mojo_cpp_bindings', '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_interface_provider_bindings' + '../mojo/mojo.gyp:mojo_service_provider_bindings' ], 'sources': [ 'common/render_frame_setup.mojom', @@ -19,7 +19,7 @@ 'export_dependent_settings': [ '../mojo/mojo.gyp:mojo_cpp_bindings', '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_interface_provider_bindings' + '../mojo/mojo.gyp:mojo_service_provider_bindings' ], }, ], diff --git a/content/content_gpu.gypi b/content/content_gpu.gypi index 1499f13..4827493 100644 --- a/content/content_gpu.gypi +++ b/content/content_gpu.gypi @@ -5,7 +5,7 @@ { 'dependencies': [ '../base/base.gyp:base', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../skia/skia.gyp:skia', '../ui/gl/gl.gyp:gl', ], diff --git a/content/content_plugin.gypi b/content/content_plugin.gypi index f95181d..c6baab9 100644 --- a/content/content_plugin.gypi +++ b/content/content_plugin.gypi @@ -6,7 +6,7 @@ 'conditions': [ ['enable_plugins==1 and OS!="linux"', { 'dependencies': [ - '../mojo/mojo.gyp:mojo_interface_provider_bindings', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../skia/skia.gyp:skia', '../third_party/WebKit/public/blink.gyp:blink', '../third_party/npapi/npapi.gyp:npapi', diff --git a/content/content_ppapi_plugin.gypi b/content/content_ppapi_plugin.gypi index 6ee6b0a..f79e1bf 100644 --- a/content/content_ppapi_plugin.gypi +++ b/content/content_ppapi_plugin.gypi @@ -7,7 +7,7 @@ ['enable_plugins==1', { 'dependencies': [ '../base/base.gyp:base', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../ppapi/ppapi_internal.gyp:ppapi_ipc', '../ui/base/ui_base.gyp:ui_base', '../ui/gfx/gfx.gyp:gfx', diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index b78f777..ddc0bc3 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -13,8 +13,8 @@ '../jingle/jingle.gyp:jingle_glue', '../media/media.gyp:media', '../mojo/mojo.gyp:mojo_environment_chromium', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', '../mojo/mojo.gyp:mojo_js_bindings_lib', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../net/net.gyp:net', '../skia/skia.gyp:skia', '../third_party/WebKit/public/blink.gyp:blink', diff --git a/content/content_utility.gypi b/content/content_utility.gypi index fd8fa77..2b46f7d 100644 --- a/content/content_utility.gypi +++ b/content/content_utility.gypi @@ -6,7 +6,7 @@ 'dependencies': [ '../base/base.gyp:base', '../courgette/courgette.gyp:courgette_lib', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', + '../mojo/mojo.gyp:mojo_service_provider_bindings', ], 'sources': [ 'public/utility/content_utility_client.cc', diff --git a/content/content_worker.gypi b/content/content_worker.gypi index 97ceab2..a04b662 100644 --- a/content/content_worker.gypi +++ b/content/content_worker.gypi @@ -5,7 +5,7 @@ { 'dependencies': [ '../base/base.gyp:base', - '../mojo/mojo.gyp:mojo_interface_provider_bindings', + '../mojo/mojo.gyp:mojo_service_provider_bindings', '../skia/skia.gyp:skia', '../third_party/WebKit/public/blink.gyp:blink', ], diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn index c00d3a6..6a47b73 100644 --- a/content/gpu/BUILD.gn +++ b/content/gpu/BUILD.gn @@ -27,7 +27,7 @@ source_set("gpu") { deps = [ "//base", "//content:export", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//skia", "//ui/gl", ] diff --git a/content/plugin/BUILD.gn b/content/plugin/BUILD.gn index 3c18c56..a5e6481 100644 --- a/content/plugin/BUILD.gn +++ b/content/plugin/BUILD.gn @@ -29,7 +29,7 @@ if (enable_plugins && !is_linux) { deps = [ "//content:export", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//skia", "//third_party/npapi", "//third_party/WebKit/public:blink", diff --git a/content/ppapi_plugin/BUILD.gn b/content/ppapi_plugin/BUILD.gn index 18f7b87..b27ae34 100644 --- a/content/ppapi_plugin/BUILD.gn +++ b/content/ppapi_plugin/BUILD.gn @@ -21,7 +21,7 @@ source_set("ppapi_plugin") { deps = [ "//base", "//content:export", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//ppapi:ppapi_ipc", "//skia", "//third_party/icu", diff --git a/content/public/common/service_registry.h b/content/public/common/service_registry.h index f35bad4..b0ec520 100644 --- a/content/public/common/service_registry.h +++ b/content/public/common/service_registry.h @@ -19,13 +19,14 @@ namespace content { // A ServiceRegistry exposes local services that have been added using // AddService to a paired remote ServiceRegistry and provides local access to -// services exposed by the remote ServiceRegistry through GetInterface. +// services exposed by the remote ServiceRegistry through +// ConnectToRemoteService. class CONTENT_EXPORT ServiceRegistry { public: virtual ~ServiceRegistry() {} // Make the service created by |service_factory| available to the remote - // InterfaceProvider. In response to each request for a service, + // ServiceProvider. In response to each request for a service, // |service_factory| will be run with an InterfaceRequest<Interface> // representing that request. template <typename Interface> @@ -48,15 +49,15 @@ class CONTENT_EXPORT ServiceRegistry { } virtual void RemoveService(const std::string& service_name) = 0; - // Connect to an interface provided by the remote interface provider. + // Connect to an interface provided by the remote service provider. template <typename Interface> - void GetRemoteInterface(mojo::InterfacePtr<Interface>* ptr) { + void ConnectToRemoteService(mojo::InterfacePtr<Interface>* ptr) { mojo::MessagePipe pipe; ptr->Bind(pipe.handle0.Pass()); - GetRemoteInterface(Interface::Name_, pipe.handle1.Pass()); + ConnectToRemoteService(Interface::Name_, pipe.handle1.Pass()); } - virtual void GetRemoteInterface(const base::StringPiece& name, - mojo::ScopedMessagePipeHandle handle) = 0; + virtual void ConnectToRemoteService(const base::StringPiece& name, + mojo::ScopedMessagePipeHandle handle) = 0; private: template <typename Interface> diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index 7cf46fd..4dde197 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn @@ -29,7 +29,7 @@ source_set("renderer") { "//gin", "//mojo/environment:chromium", "//mojo/public/js/bindings", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//net", "//skia", "//third_party/icu", diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 2cf4fd8..c7ea9c7 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -269,7 +269,7 @@ class RenderFrameSetupImpl : public mojo::InterfaceImpl<RenderFrameSetup> { public: virtual void GetServiceProviderForFrame( int32_t frame_routing_id, - mojo::InterfaceRequest<mojo::IInterfaceProvider> request) OVERRIDE { + mojo::InterfaceRequest<mojo::ServiceProvider> request) OVERRIDE { RenderFrameImpl* frame = RenderFrameImpl::FromRoutingID(frame_routing_id); // We can receive a GetServiceProviderForFrame message for a frame not yet // created due to a race between the message and a ViewMsg_New IPC that diff --git a/content/renderer/web_ui_mojo.cc b/content/renderer/web_ui_mojo.cc index 4ff9230..863fdb4 100644 --- a/content/renderer/web_ui_mojo.cc +++ b/content/renderer/web_ui_mojo.cc @@ -89,7 +89,7 @@ void WebUIMojo::OnDidFinishDocumentLoad() { SetHandleOnContextState(pipe.handle0.Pass()); RenderFrame::FromWebFrame(render_view()->GetWebView()->mainFrame())-> GetServiceRegistry()-> - GetRemoteInterface("webui_controller", pipe.handle1.Pass()); + ConnectToRemoteService("webui_controller", pipe.handle1.Pass()); } void WebUIMojo::SetHandleOnContextState(mojo::ScopedMessagePipeHandle handle) { diff --git a/content/utility/BUILD.gn b/content/utility/BUILD.gn index a15e64b..1cc0ead 100644 --- a/content/utility/BUILD.gn +++ b/content/utility/BUILD.gn @@ -17,7 +17,7 @@ source_set("utility") { "//base", "//content:export", "//courgette:courgette_lib", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//third_party/WebKit/public:blink_headers", ] } diff --git a/content/worker/BUILD.gn b/content/worker/BUILD.gn index 52a0206..3726aa8 100644 --- a/content/worker/BUILD.gn +++ b/content/worker/BUILD.gn @@ -24,7 +24,7 @@ source_set("worker") { deps = [ "//base", - "//mojo/public/interfaces/interface_provider", + "//mojo/public/interfaces/service_provider", "//skia", "//third_party/WebKit/public:blink", ] |