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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 void ChannelMojo::ChannelInfoDeleter::operator()( | 185 void ChannelMojo::ChannelInfoDeleter::operator()( |
186 mojo::embedder::ChannelInfo* ptr) const { | 186 mojo::embedder::ChannelInfo* ptr) const { |
187 mojo::embedder::DestroyChannel(ptr, base::Bind(&base::DoNothing), nullptr); | 187 mojo::embedder::DestroyChannel(ptr, base::Bind(&base::DoNothing), nullptr); |
188 } | 188 } |
189 | 189 |
190 //------------------------------------------------------------------------------ | 190 //------------------------------------------------------------------------------ |
191 | 191 |
192 // static | 192 // static |
193 bool ChannelMojo::ShouldBeUsed() { | 193 bool ChannelMojo::ShouldBeUsed() { |
194 // TODO(morrita): Remove this if it sticks. | 194 // TODO(morrita): Remove this if it sticks. |
195 return true; | 195 // ChannelMojo is currently disabled due to http://crbug.com/466814. |
| 196 return false; |
196 } | 197 } |
197 | 198 |
198 // static | 199 // static |
199 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, | 200 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, |
200 const ChannelHandle& channel_handle, | 201 const ChannelHandle& channel_handle, |
201 Mode mode, | 202 Mode mode, |
202 Listener* listener) { | 203 Listener* listener) { |
203 switch (mode) { | 204 switch (mode) { |
204 case Channel::MODE_CLIENT: | 205 case Channel::MODE_CLIENT: |
205 return make_scoped_ptr( | 206 return make_scoped_ptr( |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 if (!ok) { | 431 if (!ok) { |
431 LOG(ERROR) << "Failed to add new Mojo handle."; | 432 LOG(ERROR) << "Failed to add new Mojo handle."; |
432 return MOJO_RESULT_UNKNOWN; | 433 return MOJO_RESULT_UNKNOWN; |
433 } | 434 } |
434 } | 435 } |
435 | 436 |
436 return MOJO_RESULT_OK; | 437 return MOJO_RESULT_OK; |
437 } | 438 } |
438 | 439 |
439 } // namespace IPC | 440 } // namespace IPC |
OLD | NEW |