| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 VLOG(1) << "Pepper plugin exe path is empty."; | 382 VLOG(1) << "Pepper plugin exe path is empty."; |
| 383 return false; | 383 return false; |
| 384 } | 384 } |
| 385 | 385 |
| 386 base::CommandLine* cmd_line = new base::CommandLine(exe_path); | 386 base::CommandLine* cmd_line = new base::CommandLine(exe_path); |
| 387 cmd_line->AppendSwitchASCII(switches::kProcessType, | 387 cmd_line->AppendSwitchASCII(switches::kProcessType, |
| 388 is_broker_ ? switches::kPpapiBrokerProcess | 388 is_broker_ ? switches::kPpapiBrokerProcess |
| 389 : switches::kPpapiPluginProcess); | 389 : switches::kPpapiPluginProcess); |
| 390 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 390 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
| 391 | 391 |
| 392 #if defined(OS_WIN) |
| 393 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) { |
| 394 cmd_line->AppendArg(is_broker_ ? switches::kPrefetchArgumentPpapiBroker |
| 395 : switches::kPrefetchArgumentPpapi); |
| 396 } |
| 397 #endif // defined(OS_WIN) |
| 398 |
| 392 // These switches are forwarded to both plugin and broker pocesses. | 399 // These switches are forwarded to both plugin and broker pocesses. |
| 393 static const char* kCommonForwardSwitches[] = { | 400 static const char* kCommonForwardSwitches[] = { |
| 394 switches::kVModule | 401 switches::kVModule |
| 395 }; | 402 }; |
| 396 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches, | 403 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches, |
| 397 arraysize(kCommonForwardSwitches)); | 404 arraysize(kCommonForwardSwitches)); |
| 398 | 405 |
| 399 if (!is_broker_) { | 406 if (!is_broker_) { |
| 400 static const char* kPluginForwardSwitches[] = { | 407 static const char* kPluginForwardSwitches[] = { |
| 401 switches::kDisableSeccompFilterSandbox, | 408 switches::kDisableSeccompFilterSandbox, |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 // sent_requests_ queue should be the one that the plugin just created. | 541 // sent_requests_ queue should be the one that the plugin just created. |
| 535 Client* client = sent_requests_.front(); | 542 Client* client = sent_requests_.front(); |
| 536 sent_requests_.pop(); | 543 sent_requests_.pop(); |
| 537 | 544 |
| 538 const ChildProcessData& data = process_->GetData(); | 545 const ChildProcessData& data = process_->GetData(); |
| 539 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 546 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
| 540 data.id); | 547 data.id); |
| 541 } | 548 } |
| 542 | 549 |
| 543 } // namespace content | 550 } // namespace content |
| OLD | NEW |