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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "mojo/public/c/system/main.h" | |
13 #include "mojo/public/cpp/bindings/binding_set.h" | 12 #include "mojo/public/cpp/bindings/binding_set.h" |
| 13 #include "services/shell/public/c/main.h" |
14 #include "services/shell/public/cpp/connector.h" | 14 #include "services/shell/public/cpp/connector.h" |
15 #include "services/shell/public/cpp/interface_factory.h" | 15 #include "services/shell/public/cpp/interface_factory.h" |
16 #include "services/shell/public/cpp/service.h" | 16 #include "services/shell/public/cpp/service.h" |
17 #include "services/shell/public/cpp/service_runner.h" | 17 #include "services/shell/public/cpp/service_runner.h" |
18 #include "services/shell/public/interfaces/connector.mojom.h" | 18 #include "services/shell/public/interfaces/connector.mojom.h" |
19 #include "services/shell/tests/connect/connect_test.mojom.h" | 19 #include "services/shell/tests/connect/connect_test.mojom.h" |
20 | 20 |
21 namespace shell { | 21 namespace shell { |
22 | 22 |
23 namespace { | 23 namespace { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 mojo::BindingSet<test::mojom::StandaloneApp> standalone_bindings_; | 210 mojo::BindingSet<test::mojom::StandaloneApp> standalone_bindings_; |
211 mojo::BindingSet<test::mojom::BlockedInterface> blocked_bindings_; | 211 mojo::BindingSet<test::mojom::BlockedInterface> blocked_bindings_; |
212 mojo::BindingSet<test::mojom::UserIdTest> user_id_test_bindings_; | 212 mojo::BindingSet<test::mojom::UserIdTest> user_id_test_bindings_; |
213 test::mojom::ExposedInterfacePtr caller_; | 213 test::mojom::ExposedInterfacePtr caller_; |
214 | 214 |
215 DISALLOW_COPY_AND_ASSIGN(ConnectTestApp); | 215 DISALLOW_COPY_AND_ASSIGN(ConnectTestApp); |
216 }; | 216 }; |
217 | 217 |
218 } // namespace shell | 218 } // namespace shell |
219 | 219 |
220 MojoResult MojoMain(MojoHandle shell_handle) { | 220 MojoResult ServiceMain(MojoHandle service_request_handle) { |
221 MojoResult rv = | 221 shell::ServiceRunner runner(new shell::ConnectTestApp); |
222 shell::ServiceRunner(new shell::ConnectTestApp).Run(shell_handle); | 222 return runner.Run(service_request_handle); |
223 return rv; | |
224 } | 223 } |
OLD | NEW |