| 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 "content/browser/ppapi_plugin_process_host.h" | 5 #include "content/browser/ppapi_plugin_process_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 #if defined(OS_POSIX) | 326 #if defined(OS_POSIX) |
| 327 bool use_zygote = !is_broker_ && plugin_launcher.empty() && info.is_sandboxed; | 327 bool use_zygote = !is_broker_ && plugin_launcher.empty() && info.is_sandboxed; |
| 328 if (!info.is_sandboxed) | 328 if (!info.is_sandboxed) |
| 329 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string()); | 329 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string()); |
| 330 #endif // OS_POSIX | 330 #endif // OS_POSIX |
| 331 process_->Launch( | 331 process_->Launch( |
| 332 #if defined(OS_WIN) | 332 #if defined(OS_WIN) |
| 333 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_), | 333 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_), |
| 334 #elif defined(OS_POSIX) | 334 #elif defined(OS_POSIX) |
| 335 use_zygote, | 335 use_zygote, |
| 336 base::EnvironmentVector(), | 336 base::EnvironmentMap(), |
| 337 #endif | 337 #endif |
| 338 cmd_line); | 338 cmd_line); |
| 339 return true; | 339 return true; |
| 340 } | 340 } |
| 341 | 341 |
| 342 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { | 342 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { |
| 343 base::ProcessHandle process_handle; | 343 base::ProcessHandle process_handle; |
| 344 int renderer_child_id; | 344 int renderer_child_id; |
| 345 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); | 345 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); |
| 346 | 346 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 // sent_requests_ queue should be the one that the plugin just created. | 429 // sent_requests_ queue should be the one that the plugin just created. |
| 430 Client* client = sent_requests_.front(); | 430 Client* client = sent_requests_.front(); |
| 431 sent_requests_.pop(); | 431 sent_requests_.pop(); |
| 432 | 432 |
| 433 const ChildProcessData& data = process_->GetData(); | 433 const ChildProcessData& data = process_->GetData(); |
| 434 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 434 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
| 435 data.id); | 435 data.id); |
| 436 } | 436 } |
| 437 | 437 |
| 438 } // namespace content | 438 } // namespace content |
| OLD | NEW |