| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 connector()->Connect(kTestPackageName); | 119 connector()->Connect(kTestPackageName); |
| 120 connection->GetInterface(&root_service); | 120 connection->GetInterface(&root_service); |
| 121 base::RunLoop run_loop; | 121 base::RunLoop run_loop; |
| 122 std::string root_name; | 122 std::string root_name; |
| 123 root_service->GetTitle( | 123 root_service->GetTitle( |
| 124 base::Bind(&ReceiveOneString, &root_name, &run_loop)); | 124 base::Bind(&ReceiveOneString, &root_name, &run_loop)); |
| 125 run_loop.Run(); | 125 run_loop.Run(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 // InterfaceFactory<test::mojom::ExposedInterface>: | 128 // InterfaceFactory<test::mojom::ExposedInterface>: |
| 129 void Create(Connection* connection, | 129 void Create(const Identity& remote_identity, |
| 130 test::mojom::ExposedInterfaceRequest request) override { | 130 test::mojom::ExposedInterfaceRequest request) override { |
| 131 bindings_.AddBinding(this, std::move(request)); | 131 bindings_.AddBinding(this, std::move(request)); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void ConnectionAccepted(test::mojom::ConnectionStatePtr state) override { | 134 void ConnectionAccepted(test::mojom::ConnectionStatePtr state) override { |
| 135 connection_state_ = std::move(state); | 135 connection_state_ = std::move(state); |
| 136 ping_callback_.Run(); | 136 ping_callback_.Run(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 base::Closure ping_callback_; | 139 base::Closure ping_callback_; |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 run_loop.Run(); | 463 run_loop.Run(); |
| 464 CompareConnectionState( | 464 CompareConnectionState( |
| 465 kTestAppAName, test_name(), test_userid(), test_instance_id(), | 465 kTestAppAName, test_name(), test_userid(), test_instance_id(), |
| 466 kTestAppAName, connection->GetRemoteIdentity().user_id(), remote_id); | 466 kTestAppAName, connection->GetRemoteIdentity().user_id(), remote_id); |
| 467 } | 467 } |
| 468 | 468 |
| 469 } | 469 } |
| 470 } | 470 } |
| 471 | 471 |
| 472 } // namespace shell | 472 } // namespace shell |
| OLD | NEW |