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

Unified Diff: mojo/examples/wm_flow/init/init.cc

Issue 591633002: Replace most uses of ViewManagerInitService with client lib ViewManager::Embed() to offer the same … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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/embedded.cc ('k') | mojo/mojo_examples.gypi » ('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 c2ec35f8fa0546e73ba96f32c5da128295cc93f5..f87d4185367f76c625334ba4d9d6226fed9828df 100644
--- a/mojo/examples/wm_flow/init/init.cc
+++ b/mojo/examples/wm_flow/init/init.cc
@@ -9,12 +9,10 @@
#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"
+#include "mojo/services/public/cpp/view_manager/view_manager.h"
+#include "mojo/services/public/cpp/view_manager/view_manager_context.h"
namespace examples {
-namespace {
-void ConnectCallback(bool success) {}
-} // namespace
// This application starts the view manager, embeds the window manager and then
// starts another app (wm_flow_app) which also connects to the view manager and
@@ -27,17 +25,12 @@ class WMFlowInit : public mojo::ApplicationDelegate {
private:
// Overridden from Application:
virtual void Initialize(mojo::ApplicationImpl* app) MOJO_OVERRIDE {
- app->ConnectToService("mojo:mojo_view_manager", &view_manager_init_);
- mojo::ServiceProviderPtr sp;
- mojo::BindToProxy(new mojo::ServiceProviderImpl, &sp);
- view_manager_init_->Embed("mojo:mojo_wm_flow_wm", sp.Pass(),
- base::Bind(&ConnectCallback));
+ context_.reset(new mojo::ViewManagerContext(app));
+ context_->Embed("mojo:mojo_wm_flow_wm");
app->ConnectToApplication("mojo:mojo_wm_flow_app");
}
- void OnConnect(bool success) {}
-
- mojo::ViewManagerInitServicePtr view_manager_init_;
+ scoped_ptr<mojo::ViewManagerContext> context_;
DISALLOW_COPY_AND_ASSIGN(WMFlowInit);
};
« no previous file with comments | « mojo/examples/wm_flow/embedded/embedded.cc ('k') | mojo/mojo_examples.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698