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

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

Issue 664413003: Turn ChannelMojo on Mac and Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 void ChannelMojo::ChannelInfoDeleter::operator()( 46 void ChannelMojo::ChannelInfoDeleter::operator()(
47 mojo::embedder::ChannelInfo* ptr) const { 47 mojo::embedder::ChannelInfo* ptr) const {
48 mojo::embedder::DestroyChannelOnIOThread(ptr); 48 mojo::embedder::DestroyChannelOnIOThread(ptr);
49 } 49 }
50 50
51 //------------------------------------------------------------------------------ 51 //------------------------------------------------------------------------------
52 52
53 // static 53 // static
54 bool ChannelMojo::ShouldBeUsed() { 54 bool ChannelMojo::ShouldBeUsed() {
55 // TODO(morrita): Turn this on for a set of platforms. 55 // Being conservative, this is currently enabled only on Mac and
56 // Linux even though this should work on all platform,
viettrungluu 2014/10/21 18:28:18 s/platform/platforms/ (also, , -> .)
57 // TODO(morrita): Turn this on all platform and kill
58 // --enable-renderer-mojo-channel
59 #if defined(OS_POSIX) && !defined(OS_ANDROID)
60 return true;
61 #else
56 return false; 62 return false;
63 #endif
57 } 64 }
58 65
59 // static 66 // static
60 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, 67 scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate,
61 const ChannelHandle& channel_handle, 68 const ChannelHandle& channel_handle,
62 Mode mode, 69 Mode mode,
63 Listener* listener) { 70 Listener* listener) {
64 return make_scoped_ptr( 71 return make_scoped_ptr(
65 new ChannelMojo(delegate, channel_handle, mode, listener)); 72 new ChannelMojo(delegate, channel_handle, mode, listener));
66 } 73 }
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 286
280 fdset->CommitAll(); 287 fdset->CommitAll();
281 } 288 }
282 289
283 return MOJO_RESULT_OK; 290 return MOJO_RESULT_OK;
284 } 291 }
285 292
286 #endif // defined(OS_POSIX) && !defined(OS_NACL) 293 #endif // defined(OS_POSIX) && !defined(OS_NACL)
287 294
288 } // namespace IPC 295 } // 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