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 // ChannelMojo is currently disabled due to http://crbug.com/466814. | 195 return true; |
196 return false; | |
197 } | 196 } |
198 | 197 |
199 // static | 198 // static |
200 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, | 199 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, |
201 const ChannelHandle& channel_handle, | 200 const ChannelHandle& channel_handle, |
202 Mode mode, | 201 Mode mode, |
203 Listener* listener) { | 202 Listener* listener) { |
204 switch (mode) { | 203 switch (mode) { |
205 case Channel::MODE_CLIENT: | 204 case Channel::MODE_CLIENT: |
206 return make_scoped_ptr( | 205 return make_scoped_ptr( |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 if (!ok) { | 430 if (!ok) { |
432 LOG(ERROR) << "Failed to add new Mojo handle."; | 431 LOG(ERROR) << "Failed to add new Mojo handle."; |
433 return MOJO_RESULT_UNKNOWN; | 432 return MOJO_RESULT_UNKNOWN; |
434 } | 433 } |
435 } | 434 } |
436 | 435 |
437 return MOJO_RESULT_OK; | 436 return MOJO_RESULT_OK; |
438 } | 437 } |
439 | 438 |
440 } // namespace IPC | 439 } // namespace IPC |
OLD | NEW |