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

Side by Side Diff: components/nacl/loader/nacl_trusted_listener.cc

Issue 310853003: Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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 | Annotate | Revision Log
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 "components/nacl/loader/nacl_trusted_listener.h" 5 #include "components/nacl/loader/nacl_trusted_listener.h"
6 6
7 NaClTrustedListener::NaClTrustedListener( 7 NaClTrustedListener::NaClTrustedListener(
8 const IPC::ChannelHandle& handle, 8 const IPC::ChannelHandle& handle,
9 base::MessageLoopProxy* message_loop_proxy, 9 base::MessageLoopProxy* message_loop_proxy,
10 base::WaitableEvent* shutdown_event) { 10 base::WaitableEvent* shutdown_event) {
11 channel_.reset(new IPC::SyncChannel(handle, IPC::Channel::MODE_SERVER, this, 11 channel_ = IPC::SyncChannel::Create(handle,
12 message_loop_proxy, true, 12 IPC::Channel::MODE_SERVER,
13 shutdown_event)); 13 this,
14 message_loop_proxy,
15 true,
16 shutdown_event);
14 } 17 }
15 18
16 NaClTrustedListener::~NaClTrustedListener() { 19 NaClTrustedListener::~NaClTrustedListener() {
17 } 20 }
18 21
19 #if defined(OS_POSIX) 22 #if defined(OS_POSIX)
20 int NaClTrustedListener::TakeClientFileDescriptor() { 23 int NaClTrustedListener::TakeClientFileDescriptor() {
21 return channel_->TakeClientFileDescriptor(); 24 return channel_->TakeClientFileDescriptor();
22 } 25 }
23 #endif 26 #endif
24 27
25 bool NaClTrustedListener::OnMessageReceived(const IPC::Message& msg) { 28 bool NaClTrustedListener::OnMessageReceived(const IPC::Message& msg) {
26 return false; 29 return false;
27 } 30 }
28 31
29 void NaClTrustedListener::OnChannelConnected(int32 peer_pid) { 32 void NaClTrustedListener::OnChannelConnected(int32 peer_pid) {
30 } 33 }
31 34
32 void NaClTrustedListener::OnChannelError() { 35 void NaClTrustedListener::OnChannelError() {
33 channel_->Close(); 36 channel_->Close();
34 } 37 }
35 38
36 bool NaClTrustedListener::Send(IPC::Message* msg) { 39 bool NaClTrustedListener::Send(IPC::Message* msg) {
37 return channel_->Send(msg); 40 return channel_->Send(msg);
38 } 41 }
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_listener.cc ('k') | components/nacl/renderer/manifest_service_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698