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

Unified Diff: mojo/services/view_manager/view_manager_init_service_impl.cc

Issue 433513005: Pass ServiceProvider thru ViewManagerService::Embed() allowing embedder & embeddee to expose servic… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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/view_manager_init_service_impl.cc
diff --git a/mojo/services/view_manager/view_manager_init_service_impl.cc b/mojo/services/view_manager/view_manager_init_service_impl.cc
index a272e133148e844cf1e9873a8f4b115cb2991b88..deb8a3f1d47e3c0240d303bd8ddbb47e8b86d70b 100644
--- a/mojo/services/view_manager/view_manager_init_service_impl.cc
+++ b/mojo/services/view_manager/view_manager_init_service_impl.cc
@@ -42,7 +42,8 @@ void ViewManagerInitServiceImpl::MaybeEmbed() {
ScopedVector<ConnectParams>::const_iterator it = connect_params_.begin();
for (; it != connect_params_.end(); ++it) {
- context_->root_node_manager()->EmbedRoot((*it)->url);
+ context_->root_node_manager()->EmbedRoot((*it)->url,
+ (*it)->service_provider.Pass());
(*it)->callback.Run(true);
}
connect_params_.clear();
@@ -50,10 +51,12 @@ void ViewManagerInitServiceImpl::MaybeEmbed() {
void ViewManagerInitServiceImpl::Embed(
const String& url,
+ ServiceProviderPtr service_provider,
const Callback<void(bool)>& callback) {
ConnectParams* params = new ConnectParams;
params->url = url.To<std::string>();
params->callback = callback;
+ params->service_provider.Bind(service_provider.PassMessagePipe());
connect_params_.push_back(params);
MaybeEmbed();
}
« no previous file with comments | « mojo/services/view_manager/view_manager_init_service_impl.h ('k') | mojo/services/view_manager/view_manager_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698