| 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 a88cf60c7d2c94db651960e67259cb65e279edc5..995c936eb176015db4238206f0e180252d358e52 100644
|
| --- a/mojo/examples/demo_launcher/demo_launcher.cc
|
| +++ b/mojo/examples/demo_launcher/demo_launcher.cc
|
| @@ -12,42 +12,30 @@
|
| #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 mojo {
|
| namespace examples {
|
|
|
| -class DemoLauncher : public ApplicationDelegate {
|
| +class DemoLauncher : public mojo::ApplicationDelegate {
|
| public:
|
| DemoLauncher() {}
|
| virtual ~DemoLauncher() {}
|
|
|
| private:
|
| - virtual void Initialize(ApplicationImpl* app) MOJO_OVERRIDE {
|
| - app->ConnectToService("mojo:mojo_view_manager", &view_manager_init_);
|
| + virtual void Initialize(mojo::ApplicationImpl* app) MOJO_OVERRIDE {
|
| + context_.reset(new mojo::ViewManagerContext(app));
|
| + context_->Embed("mojo:mojo_view_manager");
|
| }
|
|
|
| - virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
|
| - MOJO_OVERRIDE {
|
| - 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;
|
| - }
|
| -
|
| - void OnConnect(bool success) {}
|
| -
|
| - ViewManagerInitServicePtr view_manager_init_;
|
| + scoped_ptr<mojo::ViewManagerContext> context_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DemoLauncher);
|
| };
|
|
|
| } // namespace examples
|
| -} // namespace mojo
|
|
|
| MojoResult MojoMain(MojoHandle shell_handle) {
|
| - mojo::ApplicationRunnerChromium runner(new mojo::examples::DemoLauncher);
|
| + mojo::ApplicationRunnerChromium runner(new examples::DemoLauncher);
|
| return runner.Run(shell_handle);
|
| }
|
|
|