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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 // plugin launcher means we need to use another process instead of just | 381 // plugin launcher means we need to use another process instead of just |
382 // forking the zygote. | 382 // forking the zygote. |
383 #if defined(OS_POSIX) | 383 #if defined(OS_POSIX) |
384 if (!info.is_sandboxed) | 384 if (!info.is_sandboxed) |
385 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string()); | 385 cmd_line->AppendSwitchASCII(switches::kNoSandbox, std::string()); |
386 #endif // OS_POSIX | 386 #endif // OS_POSIX |
387 process_->Launch( | 387 process_->Launch( |
388 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_, | 388 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_, |
389 info, | 389 info, |
390 process_->GetHost()), | 390 process_->GetHost()), |
391 cmd_line); | 391 cmd_line, |
| 392 true); |
392 return true; | 393 return true; |
393 } | 394 } |
394 | 395 |
395 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { | 396 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { |
396 base::ProcessHandle process_handle; | 397 base::ProcessHandle process_handle; |
397 int renderer_child_id; | 398 int renderer_child_id; |
398 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); | 399 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); |
399 | 400 |
400 base::ProcessId process_id = (process_handle == base::kNullProcessHandle) ? | 401 base::ProcessId process_id = (process_handle == base::kNullProcessHandle) ? |
401 0 : base::GetProcId(process_handle); | 402 0 : base::GetProcId(process_handle); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 // sent_requests_ queue should be the one that the plugin just created. | 485 // sent_requests_ queue should be the one that the plugin just created. |
485 Client* client = sent_requests_.front(); | 486 Client* client = sent_requests_.front(); |
486 sent_requests_.pop(); | 487 sent_requests_.pop(); |
487 | 488 |
488 const ChildProcessData& data = process_->GetData(); | 489 const ChildProcessData& data = process_->GetData(); |
489 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 490 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
490 data.id); | 491 data.id); |
491 } | 492 } |
492 | 493 |
493 } // namespace content | 494 } // namespace content |
OLD | NEW |