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/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "mojo/public/c/system/main.h" | |
11 #include "mojo/public/cpp/bindings/binding_set.h" | 10 #include "mojo/public/cpp/bindings/binding_set.h" |
| 11 #include "services/shell/public/c/main.h" |
12 #include "services/shell/public/cpp/connector.h" | 12 #include "services/shell/public/cpp/connector.h" |
13 #include "services/shell/public/cpp/service.h" | 13 #include "services/shell/public/cpp/service.h" |
14 #include "services/shell/public/cpp/service_runner.h" | 14 #include "services/shell/public/cpp/service_runner.h" |
15 #include "services/shell/tests/lifecycle/lifecycle_unittest.mojom.h" | 15 #include "services/shell/tests/lifecycle/lifecycle_unittest.mojom.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 void QuitLoop(base::RunLoop* loop) { | 19 void QuitLoop(base::RunLoop* loop) { |
20 loop->Quit(); | 20 loop->Quit(); |
21 } | 21 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 | 63 |
64 std::unique_ptr<shell::Connection> child_connection_; | 64 std::unique_ptr<shell::Connection> child_connection_; |
65 mojo::BindingSet<shell::test::mojom::Parent> parent_bindings_; | 65 mojo::BindingSet<shell::test::mojom::Parent> parent_bindings_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(Parent); | 67 DISALLOW_COPY_AND_ASSIGN(Parent); |
68 }; | 68 }; |
69 | 69 |
70 } // namespace | 70 } // namespace |
71 | 71 |
72 MojoResult MojoMain(MojoHandle shell_handle) { | 72 MojoResult ServiceMain(MojoHandle service_request_handle) { |
73 Parent* parent = new Parent; | 73 Parent* parent = new Parent; |
74 return shell::ServiceRunner(parent).Run(shell_handle); | 74 return shell::ServiceRunner(parent).Run(service_request_handle); |
75 } | 75 } |
OLD | NEW |