Index: mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc |
diff --git a/mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc b/mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc |
index 532fbcf6a5396d1d374a13f0c3061b8564fbd899..d80ba5dc608561d7c8e6ddfb38dc852cbc1dc2eb 100644 |
--- a/mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc |
+++ b/mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc |
@@ -195,19 +195,17 @@ void ViewManagerClientImpl::SetProperty( |
} |
void ViewManagerClientImpl::Embed(const String& url, Id view_id) { |
- MessagePipe pipe; |
- InterfaceRequest<ServiceProvider> request; |
- request.Bind(pipe.handle0.Pass()); |
- Embed(url, view_id, request.Pass()); |
+ Embed(url, view_id, nullptr, nullptr); |
} |
void ViewManagerClientImpl::Embed( |
const String& url, |
Id view_id, |
- InterfaceRequest<ServiceProvider> service_provider) { |
+ InterfaceRequest<ServiceProvider> parent_services, |
+ ServiceProviderPtr parent_exposed_services) { |
DCHECK(connected_); |
- service_->Embed(url, view_id, service_provider.Pass(), |
- ActionCompletedCallback()); |
+ service_->Embed(url, view_id, parent_services.Pass(), |
+ parent_exposed_services.Pass(), ActionCompletedCallback()); |
} |
void ViewManagerClientImpl::AddView(View* view) { |
@@ -262,6 +260,7 @@ void ViewManagerClientImpl::OnEmbed( |
const String& creator_url, |
ViewDataPtr root_data, |
InterfaceRequest<ServiceProvider> parent_services, |
+ ServiceProviderPtr parent_exposed_services, |
ScopedMessagePipeHandle window_manager_pipe) { |
DCHECK(!connected_); |
connected_ = true; |
@@ -272,14 +271,6 @@ void ViewManagerClientImpl::OnEmbed( |
root_ = AddViewToViewManager(this, nullptr, root_data); |
root_->AddObserver(new RootObserver(root_)); |
- ServiceProviderImpl* exported_services = nullptr; |
- scoped_ptr<ServiceProvider> remote; |
- |
- // BindToRequest() binds the lifetime of |exported_services| to the pipe. |
- exported_services = new ServiceProviderImpl; |
- BindToRequest(exported_services, &parent_services); |
- remote.reset(exported_services->CreateRemoteServiceProvider()); |
- |
window_manager_.Bind(window_manager_pipe.Pass()); |
window_manager_.set_client(this); |
// base::Unretained() is safe here as |window_manager_| is bound to our |
@@ -287,7 +278,9 @@ void ViewManagerClientImpl::OnEmbed( |
window_manager_->GetFocusedAndActiveViews( |
base::Bind(&ViewManagerClientImpl::OnGotFocusedAndActiveViews, |
base::Unretained(this))); |
- delegate_->OnEmbed(root_, exported_services, remote.Pass()); |
+ |
+ delegate_->OnEmbed(root_, parent_services.Pass(), |
+ parent_exposed_services.Pass()); |
} |
void ViewManagerClientImpl::OnEmbeddedAppDisconnected(Id view_id) { |