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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 #endif // defined(OS_WIN) | 192 #endif // defined(OS_WIN) |
193 NOTREACHED(); | 193 NOTREACHED(); |
194 return MOJO_RESULT_UNKNOWN; | 194 return MOJO_RESULT_UNKNOWN; |
195 } | 195 } |
196 | 196 |
197 } // namespace | 197 } // namespace |
198 | 198 |
199 //------------------------------------------------------------------------------ | 199 //------------------------------------------------------------------------------ |
200 | 200 |
201 // static | 201 // static |
202 bool ChannelMojo::ShouldBeUsed() { | |
203 // TODO(rockot): Investigate performance bottlenecks and hopefully reenable | |
204 // this at some point. http://crbug.com/500019 | |
205 return false; | |
206 } | |
207 | |
208 // static | |
209 scoped_ptr<ChannelMojo> ChannelMojo::Create( | 202 scoped_ptr<ChannelMojo> ChannelMojo::Create( |
210 mojo::ScopedMessagePipeHandle handle, | 203 mojo::ScopedMessagePipeHandle handle, |
211 Mode mode, | 204 Mode mode, |
212 Listener* listener) { | 205 Listener* listener) { |
213 return make_scoped_ptr(new ChannelMojo(std::move(handle), mode, listener)); | 206 return make_scoped_ptr(new ChannelMojo(std::move(handle), mode, listener)); |
214 } | 207 } |
215 | 208 |
216 // static | 209 // static |
217 scoped_ptr<ChannelFactory> ChannelMojo::CreateServerFactory( | 210 scoped_ptr<ChannelFactory> ChannelMojo::CreateServerFactory( |
218 mojo::ScopedMessagePipeHandle handle) { | 211 mojo::ScopedMessagePipeHandle handle) { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 DCHECK(ok); | 388 DCHECK(ok); |
396 if (!ok) { | 389 if (!ok) { |
397 LOG(ERROR) << "Failed to add new Mojo handle."; | 390 LOG(ERROR) << "Failed to add new Mojo handle."; |
398 return MOJO_RESULT_UNKNOWN; | 391 return MOJO_RESULT_UNKNOWN; |
399 } | 392 } |
400 } | 393 } |
401 return MOJO_RESULT_OK; | 394 return MOJO_RESULT_OK; |
402 } | 395 } |
403 | 396 |
404 } // namespace IPC | 397 } // namespace IPC |
OLD | NEW |