| 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" | |
| 10 #include "mojo/public/cpp/bindings/binding_set.h" | 9 #include "mojo/public/cpp/bindings/binding_set.h" |
| 10 #include "services/shell/public/c/main.h" |
| 11 #include "services/shell/public/cpp/connector.h" | 11 #include "services/shell/public/cpp/connector.h" |
| 12 #include "services/shell/public/cpp/interface_factory.h" | 12 #include "services/shell/public/cpp/interface_factory.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/public/interfaces/connector.mojom.h" | 15 #include "services/shell/public/interfaces/connector.mojom.h" |
| 16 #include "services/shell/tests/connect/connect_test.mojom.h" | 16 #include "services/shell/tests/connect/connect_test.mojom.h" |
| 17 | 17 |
| 18 namespace shell { | 18 namespace shell { |
| 19 | 19 |
| 20 using GetTitleCallback = test::mojom::ConnectTestService::GetTitleCallback; | 20 using GetTitleCallback = test::mojom::ConnectTestService::GetTitleCallback; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 std::set<Connection*> inbound_connections_; | 81 std::set<Connection*> inbound_connections_; |
| 82 mojo::BindingSet<test::mojom::ConnectTestService> bindings_; | 82 mojo::BindingSet<test::mojom::ConnectTestService> bindings_; |
| 83 mojo::BindingSet<test::mojom::ClassInterface> class_interface_bindings_; | 83 mojo::BindingSet<test::mojom::ClassInterface> class_interface_bindings_; |
| 84 | 84 |
| 85 DISALLOW_COPY_AND_ASSIGN(ConnectTestClassApp); | 85 DISALLOW_COPY_AND_ASSIGN(ConnectTestClassApp); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace shell | 88 } // namespace shell |
| 89 | 89 |
| 90 | 90 |
| 91 MojoResult MojoMain(MojoHandle shell_handle) { | 91 MojoResult ServiceMain(MojoHandle service_request_handle) { |
| 92 MojoResult rv = shell::ServiceRunner(new shell::ConnectTestClassApp) | 92 shell::ServiceRunner runner(new shell::ConnectTestClassApp); |
| 93 .Run(shell_handle); | 93 return runner.Run(service_request_handle); |
| 94 return rv; | |
| 95 } | 94 } |
| OLD | NEW |