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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 return false; | 399 return false; |
400 } | 400 } |
401 | 401 |
402 base::CommandLine* cmd_line = new base::CommandLine(exe_path); | 402 base::CommandLine* cmd_line = new base::CommandLine(exe_path); |
403 cmd_line->AppendSwitchASCII(switches::kProcessType, | 403 cmd_line->AppendSwitchASCII(switches::kProcessType, |
404 is_broker_ ? switches::kPpapiBrokerProcess | 404 is_broker_ ? switches::kPpapiBrokerProcess |
405 : switches::kPpapiPluginProcess); | 405 : switches::kPpapiPluginProcess); |
406 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token); | 406 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token); |
407 | 407 |
408 #if defined(OS_WIN) | 408 #if defined(OS_WIN) |
409 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) { | 409 cmd_line->AppendArg(is_broker_ ? switches::kPrefetchArgumentPpapiBroker |
410 cmd_line->AppendArg(is_broker_ ? switches::kPrefetchArgumentPpapiBroker | 410 : switches::kPrefetchArgumentPpapi); |
411 : switches::kPrefetchArgumentPpapi); | |
412 } | |
413 #endif // defined(OS_WIN) | 411 #endif // defined(OS_WIN) |
414 | 412 |
415 // These switches are forwarded to both plugin and broker pocesses. | 413 // These switches are forwarded to both plugin and broker pocesses. |
416 static const char* const kCommonForwardSwitches[] = { | 414 static const char* const kCommonForwardSwitches[] = { |
417 switches::kVModule | 415 switches::kVModule |
418 }; | 416 }; |
419 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches, | 417 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches, |
420 arraysize(kCommonForwardSwitches)); | 418 arraysize(kCommonForwardSwitches)); |
421 | 419 |
422 if (!is_broker_) { | 420 if (!is_broker_) { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 // 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. |
559 Client* client = sent_requests_.front(); | 557 Client* client = sent_requests_.front(); |
560 sent_requests_.pop(); | 558 sent_requests_.pop(); |
561 | 559 |
562 const ChildProcessData& data = process_->GetData(); | 560 const ChildProcessData& data = process_->GetData(); |
563 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 561 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
564 data.id); | 562 data.id); |
565 } | 563 } |
566 | 564 |
567 } // namespace content | 565 } // namespace content |
OLD | NEW |