Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Unified Diff: mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc

Issue 858103002: Remove [Client=] annotation from ServiceProvider (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase for trybots (no code changes from ps2) Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..78daeb3244d4a6b6b953b5fd2ee44893195fbf04 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,18 +195,15 @@ 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) {
+void ViewManagerClientImpl::Embed(const String& url,
+ Id view_id,
+ InterfaceRequest<ServiceProvider> services,
+ ServiceProviderPtr exposed_services) {
DCHECK(connected_);
- service_->Embed(url, view_id, service_provider.Pass(),
+ service_->Embed(url, view_id, services.Pass(), exposed_services.Pass(),
ActionCompletedCallback());
}
@@ -261,7 +258,8 @@ void ViewManagerClientImpl::OnEmbed(
ConnectionSpecificId connection_id,
const String& creator_url,
ViewDataPtr root_data,
- InterfaceRequest<ServiceProvider> parent_services,
+ InterfaceRequest<ServiceProvider> services,
+ ServiceProviderPtr exposed_services,
ScopedMessagePipeHandle window_manager_pipe) {
DCHECK(!connected_);
connected_ = true;
@@ -272,14 +270,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 +277,8 @@ void ViewManagerClientImpl::OnEmbed(
window_manager_->GetFocusedAndActiveViews(
base::Bind(&ViewManagerClientImpl::OnGotFocusedAndActiveViews,
base::Unretained(this)));
- delegate_->OnEmbed(root_, exported_services, remote.Pass());
+
+ delegate_->OnEmbed(root_, services.Pass(), exposed_services.Pass());
}
void ViewManagerClientImpl::OnEmbeddedAppDisconnected(Id view_id) {

Powered by Google App Engine
This is Rietveld 408576698