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/mojo/ipc_channel_mojo.h" | 5 #include "ipc/mojo/ipc_channel_mojo.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 main_message_loop_.message_loop_proxy()); | 63 main_message_loop_.message_loop_proxy()); |
64 } | 64 } |
65 | 65 |
66 void Connect() { | 66 void Connect() { |
67 CHECK(channel_->Connect()); | 67 CHECK(channel_->Connect()); |
68 } | 68 } |
69 | 69 |
70 IPC::ChannelMojo* channel() const { return channel_.get(); } | 70 IPC::ChannelMojo* channel() const { return channel_.get(); } |
71 | 71 |
72 private: | 72 private: |
| 73 base::MessageLoopForIO main_message_loop_; |
73 scoped_ptr<IPC::ChannelMojo> channel_; | 74 scoped_ptr<IPC::ChannelMojo> channel_; |
74 base::MessageLoopForIO main_message_loop_; | |
75 }; | 75 }; |
76 | 76 |
77 class IPCChannelMojoTest : public IPCTestBase { | 77 class IPCChannelMojoTest : public IPCTestBase { |
78 protected: | 78 protected: |
79 virtual scoped_ptr<IPC::ChannelFactory> CreateChannelFactory( | 79 virtual scoped_ptr<IPC::ChannelFactory> CreateChannelFactory( |
80 const IPC::ChannelHandle& handle, | 80 const IPC::ChannelHandle& handle, |
81 base::TaskRunner* runner) OVERRIDE { | 81 base::TaskRunner* runner) OVERRIDE { |
82 return IPC::ChannelMojo::CreateFactory( | 82 return IPC::ChannelMojo::CreateFactory( |
83 handle, IPC::Channel::MODE_SERVER, runner); | 83 handle, IPC::Channel::MODE_SERVER, runner); |
84 } | 84 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 client.Connect(); | 226 client.Connect(); |
227 listener.set_sender(client.channel()); | 227 listener.set_sender(client.channel()); |
228 | 228 |
229 base::MessageLoop::current()->Run(); | 229 base::MessageLoop::current()->Run(); |
230 | 230 |
231 return 0; | 231 return 0; |
232 } | 232 } |
233 #endif | 233 #endif |
234 | 234 |
235 } // namespace | 235 } // namespace |
OLD | NEW |