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

Unified Diff: mojo/examples/wm_flow/init/init.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
« no previous file with comments | « mojo/examples/wm_flow/embedded/embeddee.mojom ('k') | mojo/examples/wm_flow/wm/wm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/wm_flow/init/init.cc
diff --git a/mojo/examples/wm_flow/init/init.cc b/mojo/examples/wm_flow/init/init.cc
index b5a225ae894417a711fe451c5e44003a0095cc4b..512a893c38aec28aa937e381eb4e10b58f7e2089 100644
--- a/mojo/examples/wm_flow/init/init.cc
+++ b/mojo/examples/wm_flow/init/init.cc
@@ -5,6 +5,8 @@
#include "base/bind.h"
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
+#include "mojo/public/cpp/application/service_provider_impl.h"
+#include "mojo/public/interfaces/application/service_provider.mojom.h"
#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
namespace examples {
@@ -24,7 +26,9 @@ class WMFlowInit : public mojo::ApplicationDelegate {
// Overridden from Application:
virtual void Initialize(mojo::ApplicationImpl* app) MOJO_OVERRIDE {
app->ConnectToService("mojo:mojo_view_manager", &view_manager_init_);
- view_manager_init_->Embed("mojo:mojo_wm_flow_wm",
+ mojo::ServiceProviderPtr sp;
+ mojo::BindToProxy(new mojo::ServiceProviderImpl, &sp);
+ view_manager_init_->Embed("mojo:mojo_wm_flow_wm", sp.Pass(),
base::Bind(&ConnectCallback));
app->ConnectToApplication("mojo:mojo_wm_flow_app");
}
« no previous file with comments | « mojo/examples/wm_flow/embedded/embeddee.mojom ('k') | mojo/examples/wm_flow/wm/wm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698