| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "ipc/ipc_listener.h" | 10 #include "ipc/ipc_listener.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 //------------------------------------------------------------------------------ | 46 //------------------------------------------------------------------------------ |
| 47 | 47 |
| 48 void ChannelMojo::ChannelInfoDeleter::operator()( | 48 void ChannelMojo::ChannelInfoDeleter::operator()( |
| 49 mojo::embedder::ChannelInfo* ptr) const { | 49 mojo::embedder::ChannelInfo* ptr) const { |
| 50 mojo::embedder::DestroyChannelOnIOThread(ptr); | 50 mojo::embedder::DestroyChannelOnIOThread(ptr); |
| 51 } | 51 } |
| 52 | 52 |
| 53 //------------------------------------------------------------------------------ | 53 //------------------------------------------------------------------------------ |
| 54 | 54 |
| 55 // static | 55 // static |
| 56 bool ChannelMojo::CanBeUsed() { |
| 57 // TODO(morrita): Turn this on for a set of platforms. |
| 58 return false; |
| 59 } |
| 60 |
| 61 // static |
| 56 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, | 62 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, |
| 57 const ChannelHandle& channel_handle, | 63 const ChannelHandle& channel_handle, |
| 58 Mode mode, | 64 Mode mode, |
| 59 Listener* listener) { | 65 Listener* listener) { |
| 60 return make_scoped_ptr( | 66 return make_scoped_ptr( |
| 61 new ChannelMojo(delegate, channel_handle, mode, listener)); | 67 new ChannelMojo(delegate, channel_handle, mode, listener)); |
| 62 } | 68 } |
| 63 | 69 |
| 64 // static | 70 // static |
| 65 scoped_ptr<ChannelFactory> ChannelMojo::CreateServerFactory( | 71 scoped_ptr<ChannelFactory> ChannelMojo::CreateServerFactory( |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 281 |
| 276 fdset->CommitAll(); | 282 fdset->CommitAll(); |
| 277 } | 283 } |
| 278 | 284 |
| 279 return MOJO_RESULT_OK; | 285 return MOJO_RESULT_OK; |
| 280 } | 286 } |
| 281 | 287 |
| 282 #endif // defined(OS_POSIX) && !defined(OS_NACL) | 288 #endif // defined(OS_POSIX) && !defined(OS_NACL) |
| 283 | 289 |
| 284 } // namespace IPC | 290 } // namespace IPC |
| OLD | NEW |