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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 switches::kPpapiSubpixelRenderingSetting, | 447 switches::kPpapiSubpixelRenderingSetting, |
448 base::IntToString(font_params.subpixel_rendering)); | 448 base::IntToString(font_params.subpixel_rendering)); |
449 #endif | 449 #endif |
450 | 450 |
451 if (!plugin_launcher.empty()) | 451 if (!plugin_launcher.empty()) |
452 cmd_line->PrependWrapper(plugin_launcher); | 452 cmd_line->PrependWrapper(plugin_launcher); |
453 | 453 |
454 // On posix, never use the zygote for the broker. Also, only use the zygote if | 454 // On posix, never use the zygote for the broker. Also, only use the zygote if |
455 // we are not using a plugin launcher - having a plugin launcher means we need | 455 // we are not using a plugin launcher - having a plugin launcher means we need |
456 // to use another process instead of just forking the zygote. | 456 // to use another process instead of just forking the zygote. |
457 process_->Launch( | 457 process_->Launch(new PpapiPluginSandboxedProcessLauncherDelegate( |
458 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_, | 458 is_broker_, info, process_->GetHost()), |
459 info, | 459 cmd_line, nullptr, true); |
460 process_->GetHost()), | |
461 cmd_line, | |
462 true); | |
463 return true; | 460 return true; |
464 } | 461 } |
465 | 462 |
466 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { | 463 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { |
467 base::ProcessHandle process_handle; | 464 base::ProcessHandle process_handle; |
468 int renderer_child_id; | 465 int renderer_child_id; |
469 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); | 466 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); |
470 | 467 |
471 base::ProcessId process_id = base::kNullProcessId; | 468 base::ProcessId process_id = base::kNullProcessId; |
472 if (process_handle != base::kNullProcessHandle) { | 469 if (process_handle != base::kNullProcessHandle) { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 // sent_requests_ queue should be the one that the plugin just created. | 556 // sent_requests_ queue should be the one that the plugin just created. |
560 Client* client = sent_requests_.front(); | 557 Client* client = sent_requests_.front(); |
561 sent_requests_.pop(); | 558 sent_requests_.pop(); |
562 | 559 |
563 const ChildProcessData& data = process_->GetData(); | 560 const ChildProcessData& data = process_->GetData(); |
564 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 561 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
565 data.id); | 562 data.id); |
566 } | 563 } |
567 | 564 |
568 } // namespace content | 565 } // namespace content |
OLD | NEW |