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

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

Issue 303163005: Embedding demo in View manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/examples/embedded_app/embedded_app.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/basictypes.h"
6 #include "base/bind.h"
7 #include "base/run_loop.h"
8 #include "mojo/public/cpp/application/application.h"
9 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
10
11 namespace mojo {
12 namespace examples {
13
14 class DemoLauncher : public Application {
15 public:
16 DemoLauncher() {}
17 virtual ~DemoLauncher() {}
18
19 private:
20 // Overridden from Application:
21 virtual void Initialize() MOJO_OVERRIDE {
22 ConnectTo<view_manager::IViewManagerInit>("mojo:mojo_view_manager",
23 &view_manager_init_);
24 view_manager_init_->Connect("mojo:mojo_window_manager",
25 base::Bind(&DemoLauncher::OnConnect,
26 base::Unretained(this)));
27 base::RunLoop().Run();
sky 2014/06/02 19:14:59 Are you sure you need this?
28 }
29
30 void OnConnect(bool success) {}
31
32 view_manager::IViewManagerInitPtr view_manager_init_;
33
34 DISALLOW_COPY_AND_ASSIGN(DemoLauncher);
35 };
36
37 } // namespace examples
38
39 // static
40 Application* Application::Create() {
41 return new examples::DemoLauncher;
42 }
43
44 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/examples/embedded_app/embedded_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698