OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "mojo/public/c/system/main.h" | 9 #include "mojo/public/c/system/main.h" |
10 #include "mojo/public/cpp/bindings/binding_set.h" | 10 #include "mojo/public/cpp/bindings/binding_set.h" |
11 #include "mojo/shell/public/cpp/application_runner.h" | 11 #include "mojo/shell/public/cpp/application_runner.h" |
12 #include "mojo/shell/public/cpp/connector.h" | 12 #include "mojo/shell/public/cpp/connector.h" |
13 #include "mojo/shell/public/cpp/interface_factory.h" | 13 #include "mojo/shell/public/cpp/interface_factory.h" |
14 #include "mojo/shell/public/cpp/shell_client.h" | 14 #include "mojo/shell/public/cpp/shell_client.h" |
15 #include "mojo/shell/public/interfaces/shell.mojom.h" | 15 #include "mojo/shell/public/interfaces/connector.mojom.h" |
16 #include "mojo/shell/tests/connect/connect_test.mojom.h" | 16 #include "mojo/shell/tests/connect/connect_test.mojom.h" |
17 | 17 |
18 namespace mojo { | 18 namespace mojo { |
19 namespace shell { | 19 namespace shell { |
20 | 20 |
21 using GetTitleCallback = test::mojom::ConnectTestService::GetTitleCallback; | 21 using GetTitleCallback = test::mojom::ConnectTestService::GetTitleCallback; |
22 | 22 |
23 class ConnectTestApp : public ShellClient, | 23 class ConnectTestApp : public ShellClient, |
24 public InterfaceFactory<test::mojom::ConnectTestService>, | 24 public InterfaceFactory<test::mojom::ConnectTestService>, |
25 public InterfaceFactory<test::mojom::StandaloneApp>, | 25 public InterfaceFactory<test::mojom::StandaloneApp>, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 } // namespace shell | 153 } // namespace shell |
154 } // namespace mojo | 154 } // namespace mojo |
155 | 155 |
156 | 156 |
157 MojoResult MojoMain(MojoHandle shell_handle) { | 157 MojoResult MojoMain(MojoHandle shell_handle) { |
158 MojoResult rv = mojo::ApplicationRunner( | 158 MojoResult rv = mojo::ApplicationRunner( |
159 new mojo::shell::ConnectTestApp).Run(shell_handle); | 159 new mojo::shell::ConnectTestApp).Run(shell_handle); |
160 return rv; | 160 return rv; |
161 } | 161 } |
OLD | NEW |