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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 proxy_->Init(std::move(factory), true); | 663 proxy_->Init(std::move(factory), true); |
664 } | 664 } |
665 | 665 |
666 IPC::ChannelProxy* proxy() { return proxy_.get(); } | 666 IPC::ChannelProxy* proxy() { return proxy_.get(); } |
667 | 667 |
668 private: | 668 private: |
669 const bool for_server_; | 669 const bool for_server_; |
670 | 670 |
671 mojo::ScopedMessagePipeHandle handle_; | 671 mojo::ScopedMessagePipeHandle handle_; |
672 base::Thread io_thread_; | 672 base::Thread io_thread_; |
| 673 base::WaitableEvent never_signaled_; |
673 std::unique_ptr<IPC::ChannelProxy> proxy_; | 674 std::unique_ptr<IPC::ChannelProxy> proxy_; |
674 base::WaitableEvent never_signaled_; | |
675 | 675 |
676 DISALLOW_COPY_AND_ASSIGN(ChannelProxyRunner); | 676 DISALLOW_COPY_AND_ASSIGN(ChannelProxyRunner); |
677 }; | 677 }; |
678 | 678 |
679 class IPCChannelProxyMojoTest : public IPCChannelMojoTestBase { | 679 class IPCChannelProxyMojoTest : public IPCChannelMojoTestBase { |
680 public: | 680 public: |
681 void Init(const std::string& client_name) { | 681 void Init(const std::string& client_name) { |
682 IPCChannelMojoTestBase::Init(client_name); | 682 IPCChannelMojoTestBase::Init(client_name); |
683 runner_.reset(new ChannelProxyRunner(TakeHandle(), true)); | 683 runner_.reset(new ChannelProxyRunner(TakeHandle(), true)); |
684 } | 684 } |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 Connect(&listener); | 1463 Connect(&listener); |
1464 | 1464 |
1465 base::RunLoop().Run(); | 1465 base::RunLoop().Run(); |
1466 | 1466 |
1467 Close(); | 1467 Close(); |
1468 } | 1468 } |
1469 | 1469 |
1470 #endif // OS_LINUX | 1470 #endif // OS_LINUX |
1471 | 1471 |
1472 } // namespace | 1472 } // namespace |
OLD | NEW |