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

Side by Side Diff: mojo/examples/demo_launcher/demo_launcher.cc

Issue 668483002: Change mojo URLs from mojo://mojo_foo to mojo://foo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/application/application_runner_chromium.h" 5 #include "mojo/application/application_runner_chromium.h"
6 #include "mojo/public/c/system/main.h" 6 #include "mojo/public/c/system/main.h"
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/services/public/cpp/view_manager/view_manager.h" 8 #include "mojo/services/public/cpp/view_manager/view_manager.h"
9 #include "mojo/services/public/cpp/view_manager/view_manager_context.h" 9 #include "mojo/services/public/cpp/view_manager/view_manager_context.h"
10 10
11 namespace examples { 11 namespace examples {
12 12
13 class DemoLauncher : public mojo::ApplicationDelegate { 13 class DemoLauncher : public mojo::ApplicationDelegate {
14 public: 14 public:
15 DemoLauncher() {} 15 DemoLauncher() {}
16 virtual ~DemoLauncher() {} 16 virtual ~DemoLauncher() {}
17 17
18 private: 18 private:
19 virtual void Initialize(mojo::ApplicationImpl* app) override { 19 virtual void Initialize(mojo::ApplicationImpl* app) override {
20 context_.reset(new mojo::ViewManagerContext(app)); 20 context_.reset(new mojo::ViewManagerContext(app));
21 context_->Embed("mojo:mojo_window_manager"); 21 context_->Embed("mojo:window_manager");
22 } 22 }
23 23
24 scoped_ptr<mojo::ViewManagerContext> context_; 24 scoped_ptr<mojo::ViewManagerContext> context_;
25 25
26 DISALLOW_COPY_AND_ASSIGN(DemoLauncher); 26 DISALLOW_COPY_AND_ASSIGN(DemoLauncher);
27 }; 27 };
28 28
29 } // namespace examples 29 } // namespace examples
30 30
31 MojoResult MojoMain(MojoHandle shell_handle) { 31 MojoResult MojoMain(MojoHandle shell_handle) {
32 mojo::ApplicationRunnerChromium runner(new examples::DemoLauncher); 32 mojo::ApplicationRunnerChromium runner(new examples::DemoLauncher);
33 return runner.Run(shell_handle); 33 return runner.Run(shell_handle);
34 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698