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

Side by Side Diff: components/nacl/renderer/trusted_plugin_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/trusted_plugin_channel.h" 5 #include "components/nacl/renderer/trusted_plugin_channel.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "components/nacl/common/nacl_renderer_messages.h" 8 #include "components/nacl/common/nacl_renderer_messages.h"
9 #include "components/nacl/renderer/histogram.h" 9 #include "components/nacl/renderer/histogram.h"
10 #include "components/nacl/renderer/nexe_load_manager.h" 10 #include "components/nacl/renderer/nexe_load_manager.h"
11 #include "content/public/renderer/render_thread.h" 11 #include "content/public/renderer/render_thread.h"
12 #include "ipc/ipc_sync_channel.h" 12 #include "ipc/ipc_sync_channel.h"
13 #include "ipc/ipc_message_macros.h" 13 #include "ipc/ipc_message_macros.h"
14 #include "ppapi/c/pp_errors.h" 14 #include "ppapi/c/pp_errors.h"
15 15
16 namespace nacl { 16 namespace nacl {
17 17
18 TrustedPluginChannel::TrustedPluginChannel( 18 TrustedPluginChannel::TrustedPluginChannel(
19 NexeLoadManager* nexe_load_manager, 19 NexeLoadManager* nexe_load_manager,
20 const IPC::ChannelHandle& handle, 20 const IPC::ChannelHandle& handle,
21 base::WaitableEvent* shutdown_event, 21 base::WaitableEvent* shutdown_event,
22 bool is_helper_nexe) 22 bool is_helper_nexe)
23 : nexe_load_manager_(nexe_load_manager), 23 : nexe_load_manager_(nexe_load_manager),
24 is_helper_nexe_(is_helper_nexe) { 24 is_helper_nexe_(is_helper_nexe) {
25 channel_ = IPC::SyncChannel::Create( 25 channel_ = IPC::SyncChannel::Create(
26 handle, 26 handle, IPC::Channel::MODE_CLIENT, this,
27 IPC::Channel::MODE_CLIENT, 27 content::RenderThread::Get()->GetIOMessageLoopProxy(), true,
28 this, 28 shutdown_event,
29 content::RenderThread::Get()->GetIOMessageLoopProxy(), 29 content::RenderThread::Get()->GetAttachmentBroker()).Pass();
30 true,
31 shutdown_event).Pass();
32 } 30 }
33 31
34 TrustedPluginChannel::~TrustedPluginChannel() { 32 TrustedPluginChannel::~TrustedPluginChannel() {
35 } 33 }
36 34
37 bool TrustedPluginChannel::Send(IPC::Message* message) { 35 bool TrustedPluginChannel::Send(IPC::Message* message) {
38 return channel_->Send(message); 36 return channel_->Send(message);
39 } 37 }
40 38
41 bool TrustedPluginChannel::OnMessageReceived(const IPC::Message& msg) { 39 bool TrustedPluginChannel::OnMessageReceived(const IPC::Message& msg) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 : "NaCl.LoadStatus.SelLdr.NotInstalledApp"; 71 : "NaCl.LoadStatus.SelLdr.NotInstalledApp";
74 HistogramEnumerate(name, load_status, NACL_ERROR_CODE_MAX); 72 HistogramEnumerate(name, load_status, NACL_ERROR_CODE_MAX);
75 } 73 }
76 if (load_status != LOAD_OK) { 74 if (load_status != LOAD_OK) {
77 nexe_load_manager_->ReportLoadError(PP_NACL_ERROR_SEL_LDR_START_STATUS, 75 nexe_load_manager_->ReportLoadError(PP_NACL_ERROR_SEL_LDR_START_STATUS,
78 NaClErrorString(load_status)); 76 NaClErrorString(load_status));
79 } 77 }
80 } 78 }
81 79
82 } // namespace nacl 80 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | content/browser/gpu/browser_gpu_channel_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698