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

Unified Diff: mojo/services/view_manager/public/cpp/lib/view_manager_context.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_context.cc
diff --git a/mojo/services/view_manager/public/cpp/lib/view_manager_context.cc b/mojo/services/view_manager/public/cpp/lib/view_manager_context.cc
index 45752f508997fef81c8a2394bd7502c1d8945ba0..a47f59af79534be039925bda53b88ee89bc2a567 100644
--- a/mojo/services/view_manager/public/cpp/lib/view_manager_context.cc
+++ b/mojo/services/view_manager/public/cpp/lib/view_manager_context.cc
@@ -31,23 +31,13 @@ ViewManagerContext::ViewManagerContext(ApplicationImpl* application_impl)
ViewManagerContext::~ViewManagerContext() {}
void ViewManagerContext::Embed(const String& url) {
- scoped_ptr<ServiceProviderImpl> spi(new ServiceProviderImpl);
- Embed(url, spi.Pass());
+ Embed(url, nullptr, nullptr);
}
-scoped_ptr<ServiceProvider> ViewManagerContext::Embed(
- const String& url,
- scoped_ptr<ServiceProviderImpl> exported_services) {
- scoped_ptr<ServiceProvider> imported_services;
- // BindToProxy() takes ownership of |exported_services|.
- ServiceProviderImpl* registry = exported_services.release();
- ServiceProviderPtr sp;
- if (registry) {
- BindToProxy(registry, &sp);
- imported_services.reset(registry->CreateRemoteServiceProvider());
- }
- state_->wm()->Embed(url, MakeRequest<ServiceProvider>(sp.PassMessagePipe()));
- return imported_services.Pass();
+void ViewManagerContext::Embed(const String& url,
+ InterfaceRequest<ServiceProvider> services,
+ ServiceProviderPtr exposed_services) {
+ state_->wm()->Embed(url, services.Pass(), exposed_services.Pass());
}
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698