From 9916ecfd2efc8760aa1f60a008591bd59dd89eee Mon Sep 17 00:00:00 2001
From: "xhwang@chromium.org"
 <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed, 25 Jun 2014 00:40:32 +0000
Subject: Revert 279557 "Support exposing Mojo services between render fra..."

Causing compile failure:
http://build.chromium.org/p/chromium.linux/builders/Android%20Builder%20%28dbg%29/builds/60210

> Support exposing Mojo services between render frames, render threads, and their respective hosts.
>
> This introduces ServiceRegistry as an abstraction around providing
> services to and accessing services from a remote peer. In particular,
> this adds peered service registries to RenderProcessHost and
> RenderThread, and to RenderFrameHost and RenderFrame - the RenderFrame
> setup is implemented using the RenderProcessHost/RenderThread
> ServiceRegistry pair.
>
> This replaces the existing WebUI handle setup by adding a webUI
> controller service to the frame host registry and a corresponding
> request for the webUI controller service to the frame registry.
>
> BUG=386155
>
> Review URL: https://codereview.chromium.org/285333003

TBR=sammc@chromium.org

Review URL: https://codereview.chromium.org/352013002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279561 0039d316-1c4b-4281-b951-d872f2087c98
---
 content/browser/mojo/mojo_application_host.cc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'content/browser/mojo/mojo_application_host.cc')

diff --git a/content/browser/mojo/mojo_application_host.cc b/content/browser/mojo/mojo_application_host.cc
index 2491252..90187b9 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(!client_handle_.is_valid()) << "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();
 
-  service_registry_.BindRemoteServiceProvider(message_pipe.Pass());
+  child_service_provider_.reset(
+      BindToPipe(new ServiceProviderImpl(), message_pipe.Pass()));
   return true;
 }
 
@@ -59,4 +60,12 @@ bool MojoApplicationHost::Activate(IPC::Sender* sender,
   return did_activate_;
 }
 
+void MojoApplicationHost::ServiceProviderImpl::ConnectToService(
+    const mojo::String& service_url,
+    const mojo::String& service_name,
+    mojo::ScopedMessagePipeHandle handle,
+    const mojo::String& requestor_url) {
+  // TODO(darin): Provide something meaningful here.
+}
+
 }  // namespace content
-- 
cgit v1.1