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

Side by Side Diff: components/nacl/renderer/manifest_service_channel.cc

Issue 1184523003: attachment broker wip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comments. Created 5 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
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/renderer/manifest_service_channel.h" 5 #include "components/nacl/renderer/manifest_service_channel.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "content/public/common/sandbox_init.h" 10 #include "content/public/common/sandbox_init.h"
11 #include "content/public/renderer/render_thread.h" 11 #include "content/public/renderer/render_thread.h"
12 #include "ipc/ipc_channel.h" 12 #include "ipc/ipc_channel.h"
13 #include "ipc/ipc_sync_channel.h" 13 #include "ipc/ipc_sync_channel.h"
14 #include "ppapi/c/pp_errors.h" 14 #include "ppapi/c/pp_errors.h"
15 #include "ppapi/c/ppb_file_io.h" 15 #include "ppapi/c/ppb_file_io.h"
16 #include "ppapi/proxy/ppapi_messages.h" 16 #include "ppapi/proxy/ppapi_messages.h"
17 17
18 namespace nacl { 18 namespace nacl {
19 19
20 ManifestServiceChannel::ManifestServiceChannel( 20 ManifestServiceChannel::ManifestServiceChannel(
21 const IPC::ChannelHandle& handle, 21 const IPC::ChannelHandle& handle,
22 const base::Callback<void(int32_t)>& connected_callback, 22 const base::Callback<void(int32_t)>& connected_callback,
23 scoped_ptr<Delegate> delegate, 23 scoped_ptr<Delegate> delegate,
24 base::WaitableEvent* waitable_event) 24 base::WaitableEvent* waitable_event,
25 IPC::AttachmentBroker* broker)
25 : connected_callback_(connected_callback), 26 : connected_callback_(connected_callback),
26 delegate_(delegate.Pass()), 27 delegate_(delegate.Pass()),
27 channel_(IPC::SyncChannel::Create( 28 channel_(IPC::SyncChannel::Create(
28 handle, 29 handle,
29 IPC::Channel::MODE_CLIENT, 30 IPC::Channel::MODE_CLIENT,
30 this, 31 this,
31 content::RenderThread::Get()->GetIOMessageLoopProxy(), 32 content::RenderThread::Get()->GetIOMessageLoopProxy(),
32 true, 33 true,
33 waitable_event)), 34 waitable_event,
35 broker)),
34 peer_pid_(base::kNullProcessId), 36 peer_pid_(base::kNullProcessId),
35 weak_ptr_factory_(this) { 37 weak_ptr_factory_(this) {
36 } 38 }
37 39
38 ManifestServiceChannel::~ManifestServiceChannel() { 40 ManifestServiceChannel::~ManifestServiceChannel() {
39 if (!connected_callback_.is_null()) 41 if (!connected_callback_.is_null())
40 base::ResetAndReturn(&connected_callback_).Run(PP_ERROR_FAILED); 42 base::ResetAndReturn(&connected_callback_).Run(PP_ERROR_FAILED);
41 } 43 }
42 44
43 void ManifestServiceChannel::Send(IPC::Message* message) { 45 void ManifestServiceChannel::Send(IPC::Message* message) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 #endif 103 #endif
102 } 104 }
103 PpapiHostMsg_OpenResource::WriteReplyParams(reply, 105 PpapiHostMsg_OpenResource::WriteReplyParams(reply,
104 handle, 106 handle,
105 token_lo, 107 token_lo,
106 token_hi); 108 token_hi);
107 Send(reply); 109 Send(reply);
108 } 110 }
109 111
110 } // namespace nacl 112 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/renderer/manifest_service_channel.h ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698