Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: ipc/mojo/ipc_channel_mojo.cc

Issue 857483004: Enable ChannelMojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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): Turn this on for a set of platforms. 176 // TODO(morrita): Remove this if it sticks.
177 return false; 177 return true;
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698