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 15 matching lines...) Expand all Loading... |
26 #include "content/common/content_switches_internal.h" | 26 #include "content/common/content_switches_internal.h" |
27 #include "content/public/browser/content_browser_client.h" | 27 #include "content/public/browser/content_browser_client.h" |
28 #include "content/public/common/content_constants.h" | 28 #include "content/public/common/content_constants.h" |
29 #include "content/public/common/content_switches.h" | 29 #include "content/public/common/content_switches.h" |
30 #include "content/public/common/mojo_channel_switches.h" | 30 #include "content/public/common/mojo_channel_switches.h" |
31 #include "content/public/common/pepper_plugin_info.h" | 31 #include "content/public/common/pepper_plugin_info.h" |
32 #include "content/public/common/process_type.h" | 32 #include "content/public/common/process_type.h" |
33 #include "content/public/common/sandbox_type.h" | 33 #include "content/public/common/sandbox_type.h" |
34 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 34 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
35 #include "content/public/common/service_names.mojom.h" | 35 #include "content/public/common/service_names.mojom.h" |
| 36 #include "media/base/media_switches.h" |
36 #include "mojo/edk/embedder/embedder.h" | 37 #include "mojo/edk/embedder/embedder.h" |
37 #include "net/base/network_change_notifier.h" | 38 #include "net/base/network_change_notifier.h" |
38 #include "ppapi/proxy/ppapi_messages.h" | 39 #include "ppapi/proxy/ppapi_messages.h" |
39 #include "ui/base/ui_base_switches.h" | 40 #include "ui/base/ui_base_switches.h" |
40 | 41 |
41 #if defined(OS_POSIX) | 42 #if defined(OS_POSIX) |
42 #include "content/public/browser/zygote_handle_linux.h" | 43 #include "content/public/browser/zygote_handle_linux.h" |
43 #endif // defined(OS_POSIX) | 44 #endif // defined(OS_POSIX) |
44 | 45 |
45 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 }; | 393 }; |
393 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches, | 394 cmd_line->CopySwitchesFrom(browser_command_line, kCommonForwardSwitches, |
394 arraysize(kCommonForwardSwitches)); | 395 arraysize(kCommonForwardSwitches)); |
395 | 396 |
396 if (!is_broker_) { | 397 if (!is_broker_) { |
397 static const char* const kPluginForwardSwitches[] = { | 398 static const char* const kPluginForwardSwitches[] = { |
398 switches::kDisableSeccompFilterSandbox, | 399 switches::kDisableSeccompFilterSandbox, |
399 #if defined(OS_MACOSX) | 400 #if defined(OS_MACOSX) |
400 switches::kEnableSandboxLogging, | 401 switches::kEnableSandboxLogging, |
401 #endif | 402 #endif |
| 403 // Need to tell CdmHostFile(s) to ignore missing CDM host files in tests. |
| 404 switches::kIgnoreMissingCdmHostFile, |
402 switches::kNoSandbox, | 405 switches::kNoSandbox, |
403 switches::kPpapiStartupDialog, | 406 switches::kPpapiStartupDialog, |
404 }; | 407 }; |
405 cmd_line->CopySwitchesFrom(browser_command_line, kPluginForwardSwitches, | 408 cmd_line->CopySwitchesFrom(browser_command_line, kPluginForwardSwitches, |
406 arraysize(kPluginForwardSwitches)); | 409 arraysize(kPluginForwardSwitches)); |
407 | 410 |
408 // Copy any flash args over if necessary. | 411 // Copy any flash args over if necessary. |
409 // TODO(vtl): Stop passing flash args in the command line, or windows is | 412 // TODO(vtl): Stop passing flash args in the command line, or windows is |
410 // going to explode. | 413 // going to explode. |
411 std::string existing_args = | 414 std::string existing_args = |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 // sent_requests_ queue should be the one that the plugin just created. | 553 // sent_requests_ queue should be the one that the plugin just created. |
551 Client* client = sent_requests_.front(); | 554 Client* client = sent_requests_.front(); |
552 sent_requests_.pop(); | 555 sent_requests_.pop(); |
553 | 556 |
554 const ChildProcessData& data = process_->GetData(); | 557 const ChildProcessData& data = process_->GetData(); |
555 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 558 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
556 data.id); | 559 data.id); |
557 } | 560 } |
558 | 561 |
559 } // namespace content | 562 } // namespace content |
OLD | NEW |