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