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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 ListenerThatShouldBeNeverCalled never_called_; | 109 ListenerThatShouldBeNeverCalled never_called_; |
110 }; | 110 }; |
111 | 111 |
112 | 112 |
113 void IPCChannelMojoTest::CreateMojoChannel(IPC::Listener* listener) { | 113 void IPCChannelMojoTest::CreateMojoChannel(IPC::Listener* listener) { |
114 CreateChannel(&never_called_); | 114 CreateChannel(&never_called_); |
115 scoped_ptr<IPC::Channel> mojo_channel = IPC::ChannelMojo::Create( | 115 scoped_ptr<IPC::Channel> mojo_channel = IPC::ChannelMojo::Create( |
116 ReleaseChannel(), IPC::Channel::MODE_SERVER, listener, | 116 ReleaseChannel(), IPC::Channel::MODE_SERVER, listener, |
117 io_thread_task_runner()).PassAs<IPC::Channel>(); | 117 task_runner()).PassAs<IPC::Channel>(); |
118 SetChannel(mojo_channel.PassAs<IPC::Channel>()); | 118 SetChannel(mojo_channel.PassAs<IPC::Channel>()); |
119 } | 119 } |
120 | 120 |
121 class TestChannelListenerWithExtraExpectations | 121 class TestChannelListenerWithExtraExpectations |
122 : public IPC::TestChannelListener { | 122 : public IPC::TestChannelListener { |
123 public: | 123 public: |
124 TestChannelListenerWithExtraExpectations() | 124 TestChannelListenerWithExtraExpectations() |
125 : is_connected_called_(false) { | 125 : is_connected_called_(false) { |
126 } | 126 } |
127 | 127 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 client.Connect(); | 259 client.Connect(); |
260 listener.set_sender(client.channel()); | 260 listener.set_sender(client.channel()); |
261 | 261 |
262 base::MessageLoop::current()->Run(); | 262 base::MessageLoop::current()->Run(); |
263 | 263 |
264 return 0; | 264 return 0; |
265 } | 265 } |
266 #endif | 266 #endif |
267 | 267 |
268 } // namespace | 268 } // namespace |
OLD | NEW |