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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 #endif | 442 #endif |
443 | 443 |
444 if (!plugin_launcher.empty()) | 444 if (!plugin_launcher.empty()) |
445 cmd_line->PrependWrapper(plugin_launcher); | 445 cmd_line->PrependWrapper(plugin_launcher); |
446 | 446 |
447 // On posix, never use the zygote for the broker. Also, only use the zygote if | 447 // On posix, never use the zygote for the broker. Also, only use the zygote if |
448 // we are not using a plugin launcher - having a plugin launcher means we need | 448 // we are not using a plugin launcher - having a plugin launcher means we need |
449 // to use another process instead of just forking the zygote. | 449 // to use another process instead of just forking the zygote. |
450 process_->Launch(new PpapiPluginSandboxedProcessLauncherDelegate( | 450 process_->Launch(new PpapiPluginSandboxedProcessLauncherDelegate( |
451 is_broker_, process_->GetHost()), | 451 is_broker_, process_->GetHost()), |
452 cmd_line, nullptr, true); | 452 cmd_line, true); |
453 return true; | 453 return true; |
454 } | 454 } |
455 | 455 |
456 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { | 456 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { |
457 base::ProcessHandle process_handle; | 457 base::ProcessHandle process_handle; |
458 int renderer_child_id; | 458 int renderer_child_id; |
459 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); | 459 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); |
460 | 460 |
461 base::ProcessId process_id = base::kNullProcessId; | 461 base::ProcessId process_id = base::kNullProcessId; |
462 if (process_handle != base::kNullProcessHandle) { | 462 if (process_handle != base::kNullProcessHandle) { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 // sent_requests_ queue should be the one that the plugin just created. | 549 // sent_requests_ queue should be the one that the plugin just created. |
550 Client* client = sent_requests_.front(); | 550 Client* client = sent_requests_.front(); |
551 sent_requests_.pop(); | 551 sent_requests_.pop(); |
552 | 552 |
553 const ChildProcessData& data = process_->GetData(); | 553 const ChildProcessData& data = process_->GetData(); |
554 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 554 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
555 data.id); | 555 data.id); |
556 } | 556 } |
557 | 557 |
558 } // namespace content | 558 } // namespace content |
OLD | NEW |