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

Side by Side Diff: mojo/examples/wm_flow/init/init.cc

Issue 400113005: A new WM bootstrap flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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/bind.h"
6 #include "mojo/public/cpp/application/application_delegate.h"
7 #include "mojo/public/cpp/application/application_impl.h"
8 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
9
10 namespace examples {
11 namespace {
12 void ConnectCallback(bool success) {}
13 } // namespace
14
15 class WMFlowInit : public mojo::ApplicationDelegate {
16 public:
17 WMFlowInit() {}
18 virtual ~WMFlowInit() {}
19
20 private:
21 // Overridden from Application:
22 virtual void Initialize(mojo::ApplicationImpl* app) MOJO_OVERRIDE {
23 app->ConnectToService("mojo:mojo_view_manager", &view_manager_init_);
24 view_manager_init_->Embed("mojo:mojo_wm_flow_wm",
25 base::Bind(&ConnectCallback));
26 app->ConnectToApplication("mojo:mojo_wm_flow_app");
27 }
28
29 void OnConnect(bool success) {}
30
31 mojo::view_manager::ViewManagerInitServicePtr view_manager_init_;
32
33 DISALLOW_COPY_AND_ASSIGN(WMFlowInit);
34 };
35
36 } // namespace examples
37
38 namespace mojo {
39
40 // static
41 ApplicationDelegate* ApplicationDelegate::Create() {
42 return new examples::WMFlowInit;
43 }
44
45 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698