OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ipc/ipc_channel_mojo.h" | 5 #include "ipc/ipc_channel_mojo.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 | 914 |
915 // Use an interface requested via another interface. On the remote end both | 915 // Use an interface requested via another interface. On the remote end both |
916 // interfaces are bound on the proxy thread. This ensures that the Ping | 916 // interfaces are bound on the proxy thread. This ensures that the Ping |
917 // message we send will still be dispatched properly even though the remote | 917 // message we send will still be dispatched properly even though the remote |
918 // endpoint may not have been bound yet by the time the message is initially | 918 // endpoint may not have been bound yet by the time the message is initially |
919 // processed on the IO thread. | 919 // processed on the IO thread. |
920 IPC::mojom::IndirectTestDriverAssociatedPtr driver; | 920 IPC::mojom::IndirectTestDriverAssociatedPtr driver; |
921 IPC::mojom::PingReceiverAssociatedPtr ping_receiver; | 921 IPC::mojom::PingReceiverAssociatedPtr ping_receiver; |
922 proxy()->GetRemoteAssociatedInterface(&driver); | 922 proxy()->GetRemoteAssociatedInterface(&driver); |
923 driver->GetPingReceiver( | 923 driver->GetPingReceiver( |
924 mojo::GetProxy(&ping_receiver, driver.associated_group())); | 924 mojo::MakeRequest(&ping_receiver, driver.associated_group())); |
925 | 925 |
926 base::RunLoop loop; | 926 base::RunLoop loop; |
927 ping_receiver->Ping(loop.QuitClosure()); | 927 ping_receiver->Ping(loop.QuitClosure()); |
928 loop.Run(); | 928 loop.Run(); |
929 | 929 |
930 DestroyProxy(); | 930 DestroyProxy(); |
931 } | 931 } |
932 | 932 |
933 class ListenerWithSyncAssociatedInterface | 933 class ListenerWithSyncAssociatedInterface |
934 : public IPC::Listener, | 934 : public IPC::Listener, |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 Connect(&listener); | 1410 Connect(&listener); |
1411 | 1411 |
1412 base::RunLoop().Run(); | 1412 base::RunLoop().Run(); |
1413 | 1413 |
1414 Close(); | 1414 Close(); |
1415 } | 1415 } |
1416 | 1416 |
1417 #endif // OS_LINUX | 1417 #endif // OS_LINUX |
1418 | 1418 |
1419 } // namespace | 1419 } // namespace |
OLD | NEW |