| 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 "chrome/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 | 483 |
| 484 return plugin_map.rbegin()->second; | 484 return plugin_map.rbegin()->second; |
| 485 } | 485 } |
| 486 #endif // BUILDFLAG(ENABLE_PLUGINS) | 486 #endif // BUILDFLAG(ENABLE_PLUGINS) |
| 487 | 487 |
| 488 void ChromeContentClient::AddPepperPlugins( | 488 void ChromeContentClient::AddPepperPlugins( |
| 489 std::vector<content::PepperPluginInfo>* plugins) { | 489 std::vector<content::PepperPluginInfo>* plugins) { |
| 490 #if BUILDFLAG(ENABLE_PLUGINS) | 490 #if BUILDFLAG(ENABLE_PLUGINS) |
| 491 ComputeBuiltInPlugins(plugins); | 491 ComputeBuiltInPlugins(plugins); |
| 492 | 492 |
| 493 // If flash is disabled, do not try to add any flash plugin. |
| 494 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 495 if (command_line->HasSwitch(switches::kDisableBundledPpapiFlash)) |
| 496 return; |
| 497 |
| 493 std::vector<std::unique_ptr<content::PepperPluginInfo>> flash_versions; | 498 std::vector<std::unique_ptr<content::PepperPluginInfo>> flash_versions; |
| 494 | 499 |
| 495 // Get component updated flash for desktop Linux and Chrome OS. | 500 // Get component updated flash for desktop Linux and Chrome OS. |
| 496 #if defined(OS_LINUX) | 501 #if defined(OS_LINUX) |
| 497 // Depending on the sandbox configuration, the file system | 502 // Depending on the sandbox configuration, the file system |
| 498 // is not always available. If it is not available, do not try and load any | 503 // is not always available. If it is not available, do not try and load any |
| 499 // flash plugin. The flash player, if any, preloaded before the sandbox | 504 // flash plugin. The flash player, if any, preloaded before the sandbox |
| 500 // initialization will continue to be used. | 505 // initialization will continue to be used. |
| 501 if (!sandbox::Credentials::HasFileSystemAccess()) | 506 if (!sandbox::Credentials::HasFileSystemAccess()) |
| 502 return; | 507 return; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 if (!origin_trial_policy_) | 693 if (!origin_trial_policy_) |
| 689 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); | 694 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); |
| 690 return origin_trial_policy_.get(); | 695 return origin_trial_policy_.get(); |
| 691 } | 696 } |
| 692 | 697 |
| 693 #if defined(OS_ANDROID) | 698 #if defined(OS_ANDROID) |
| 694 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 699 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
| 695 return new ChromeMediaClientAndroid(); | 700 return new ChromeMediaClientAndroid(); |
| 696 } | 701 } |
| 697 #endif // OS_ANDROID | 702 #endif // OS_ANDROID |
| OLD | NEW |