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

Side by Side Diff: mojo/examples/aura_demo/view_manager_init.cc

Issue 313483002: Gets aura_demo working with the view_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 master and fix windows 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
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 "mojo/public/cpp/application/application.h"
8 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
9
10 namespace mojo {
11 namespace examples {
12
13 // ViewManagerInit is responsible for establishing the initial connection to
14 // the view manager. When established it loads |mojo_aura_demo|.
15 class ViewManagerInit : public Application {
16 public:
17 ViewManagerInit() {}
18 virtual ~ViewManagerInit() {}
19
20 virtual void Initialize() OVERRIDE {
21 ConnectTo("mojo:mojo_view_manager", &view_manager_init_);
22 view_manager_init_->Connect("mojo:mojo_aura_demo",
23 base::Bind(&ViewManagerInit::DidConnect,
24 base::Unretained(this)));
25 }
26
27 private:
28 void DidConnect(bool result) {
29 DCHECK(result);
30 VLOG(1) << "ViewManagerInit::DidConnection result=" << result;
31 }
32
33 view_manager::IViewManagerInitPtr view_manager_init_;
34
35 DISALLOW_COPY_AND_ASSIGN(ViewManagerInit);
36 };
37
38 } // namespace examples
39
40 // static
41 Application* Application::Create() {
42 return new examples::ViewManagerInit();
43 }
44
45 } // namespace mojo
46
OLDNEW
« no previous file with comments | « mojo/examples/aura_demo/context_factory_view_manager.cc ('k') | mojo/examples/aura_demo/window_tree_host_view_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698