| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/nacl_process_host.h" | 5 #include "components/nacl/browser/nacl_process_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 // Attempt to open more than 1 browser channel is not supported. | 1132 // Attempt to open more than 1 browser channel is not supported. |
| 1133 // Shut down the NaCl process. | 1133 // Shut down the NaCl process. |
| 1134 process_->GetHost()->ForceShutdown(); | 1134 process_->GetHost()->ForceShutdown(); |
| 1135 return false; | 1135 return false; |
| 1136 } | 1136 } |
| 1137 | 1137 |
| 1138 DCHECK_EQ(PROCESS_TYPE_NACL_LOADER, process_->GetData().process_type); | 1138 DCHECK_EQ(PROCESS_TYPE_NACL_LOADER, process_->GetData().process_type); |
| 1139 | 1139 |
| 1140 ipc_proxy_channel_ = IPC::ChannelProxy::Create( | 1140 ipc_proxy_channel_ = IPC::ChannelProxy::Create( |
| 1141 channel_handle.release(), IPC::Channel::MODE_CLIENT, NULL, | 1141 channel_handle.release(), IPC::Channel::MODE_CLIENT, NULL, |
| 1142 base::ThreadTaskRunnerHandle::Get().get()); | 1142 base::ThreadTaskRunnerHandle::Get().get(), |
| 1143 content::ChildProcessHost::GetAttachmentBroker()); |
| 1143 // Create the browser ppapi host and enable PPAPI message dispatching to the | 1144 // Create the browser ppapi host and enable PPAPI message dispatching to the |
| 1144 // browser process. | 1145 // browser process. |
| 1145 ppapi_host_.reset(content::BrowserPpapiHost::CreateExternalPluginProcess( | 1146 ppapi_host_.reset(content::BrowserPpapiHost::CreateExternalPluginProcess( |
| 1146 ipc_proxy_channel_.get(), // sender | 1147 ipc_proxy_channel_.get(), // sender |
| 1147 permissions_, | 1148 permissions_, |
| 1148 process_->GetData().handle, | 1149 process_->GetData().handle, |
| 1149 ipc_proxy_channel_.get(), | 1150 ipc_proxy_channel_.get(), |
| 1150 nacl_host_message_filter_->render_process_id(), | 1151 nacl_host_message_filter_->render_process_id(), |
| 1151 render_view_id_, | 1152 render_view_id_, |
| 1152 profile_directory_)); | 1153 profile_directory_)); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 NaClStartDebugExceptionHandlerThread( | 1389 NaClStartDebugExceptionHandlerThread( |
| 1389 process.Pass(), info, base::ThreadTaskRunnerHandle::Get(), | 1390 process.Pass(), info, base::ThreadTaskRunnerHandle::Get(), |
| 1390 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1391 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
| 1391 weak_factory_.GetWeakPtr())); | 1392 weak_factory_.GetWeakPtr())); |
| 1392 return true; | 1393 return true; |
| 1393 } | 1394 } |
| 1394 } | 1395 } |
| 1395 #endif | 1396 #endif |
| 1396 | 1397 |
| 1397 } // namespace nacl | 1398 } // namespace nacl |
| OLD | NEW |