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

Unified Diff: mojo/examples/demo_launcher/demo_launcher.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/browser/browser.cc ('k') | mojo/examples/embedded_app/embedded_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/demo_launcher/demo_launcher.cc
diff --git a/mojo/examples/demo_launcher/demo_launcher.cc b/mojo/examples/demo_launcher/demo_launcher.cc
index 86a1b3db92032cd2d8329241cc8d96db01f6c929..f045d71ad8c075c3de688a938703e560ca69ab79 100644
--- a/mojo/examples/demo_launcher/demo_launcher.cc
+++ b/mojo/examples/demo_launcher/demo_launcher.cc
@@ -8,6 +8,8 @@
#include "mojo/public/cpp/application/application_connection.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 mojo {
@@ -25,7 +27,9 @@ class DemoLauncher : public ApplicationDelegate {
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
MOJO_OVERRIDE {
- view_manager_init_->Embed("mojo:mojo_window_manager",
+ ServiceProviderPtr sp;
+ BindToProxy(new ServiceProviderImpl, &sp);
+ view_manager_init_->Embed("mojo:mojo_window_manager", sp.Pass(),
base::Bind(&DemoLauncher::OnConnect,
base::Unretained(this)));
return true;
« no previous file with comments | « mojo/examples/browser/browser.cc ('k') | mojo/examples/embedded_app/embedded_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698