OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "mojo/public/c/system/main.h" |
6 #include "mojo/public/cpp/application/application_delegate.h" | 7 #include "mojo/public/cpp/application/application_delegate.h" |
7 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/application_impl.h" |
| 9 #include "mojo/public/cpp/application/application_runner_chromium.h" |
8 #include "mojo/public/cpp/application/service_provider_impl.h" | 10 #include "mojo/public/cpp/application/service_provider_impl.h" |
9 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 11 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
10 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 12 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
11 | 13 |
12 namespace examples { | 14 namespace examples { |
13 namespace { | 15 namespace { |
14 void ConnectCallback(bool success) {} | 16 void ConnectCallback(bool success) {} |
15 } // namespace | 17 } // namespace |
16 | 18 |
17 // This application starts the view manager, embeds the window manager and then | 19 // This application starts the view manager, embeds the window manager and then |
(...skipping 17 matching lines...) Expand all Loading... |
35 | 37 |
36 void OnConnect(bool success) {} | 38 void OnConnect(bool success) {} |
37 | 39 |
38 mojo::ViewManagerInitServicePtr view_manager_init_; | 40 mojo::ViewManagerInitServicePtr view_manager_init_; |
39 | 41 |
40 DISALLOW_COPY_AND_ASSIGN(WMFlowInit); | 42 DISALLOW_COPY_AND_ASSIGN(WMFlowInit); |
41 }; | 43 }; |
42 | 44 |
43 } // namespace examples | 45 } // namespace examples |
44 | 46 |
45 namespace mojo { | 47 MojoResult MojoMain(MojoHandle shell_handle) { |
46 | 48 mojo::ApplicationRunnerChromium runner(new examples::WMFlowInit); |
47 // static | 49 return runner.Run(shell_handle); |
48 ApplicationDelegate* ApplicationDelegate::Create() { | |
49 return new examples::WMFlowInit; | |
50 } | 50 } |
51 | |
52 } // namespace | |
OLD | NEW |