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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 void ChannelMojo::ChannelInfoDeleter::operator()( | 167 void ChannelMojo::ChannelInfoDeleter::operator()( |
168 mojo::embedder::ChannelInfo* ptr) const { | 168 mojo::embedder::ChannelInfo* ptr) const { |
169 mojo::embedder::DestroyChannel(ptr); | 169 mojo::embedder::DestroyChannel(ptr); |
170 } | 170 } |
171 | 171 |
172 //------------------------------------------------------------------------------ | 172 //------------------------------------------------------------------------------ |
173 | 173 |
174 // static | 174 // static |
175 bool ChannelMojo::ShouldBeUsed() { | 175 bool ChannelMojo::ShouldBeUsed() { |
176 // TODO(morrita): Remove this if it sticks. | 176 // TODO(morrita): Turn this on for a set of platforms. |
177 return true; | 177 return false; |
178 } | 178 } |
179 | 179 |
180 // static | 180 // static |
181 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, | 181 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, |
182 const ChannelHandle& channel_handle, | 182 const ChannelHandle& channel_handle, |
183 Mode mode, | 183 Mode mode, |
184 Listener* listener) { | 184 Listener* listener) { |
185 switch (mode) { | 185 switch (mode) { |
186 case Channel::MODE_CLIENT: | 186 case Channel::MODE_CLIENT: |
187 return make_scoped_ptr( | 187 return make_scoped_ptr( |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 396 |
397 fdset->CommitAll(); | 397 fdset->CommitAll(); |
398 } | 398 } |
399 | 399 |
400 return MOJO_RESULT_OK; | 400 return MOJO_RESULT_OK; |
401 } | 401 } |
402 | 402 |
403 #endif // defined(OS_POSIX) && !defined(OS_NACL) | 403 #endif // defined(OS_POSIX) && !defined(OS_NACL) |
404 | 404 |
405 } // namespace IPC | 405 } // namespace IPC |
OLD | NEW |