| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 new content::PepperPluginInfo); | 548 new content::PepperPluginInfo); |
| 549 if (GetSystemPepperFlash(system_flash.get())) | 549 if (GetSystemPepperFlash(system_flash.get())) |
| 550 flash_versions.push_back(system_flash.release()); | 550 flash_versions.push_back(system_flash.release()); |
| 551 | 551 |
| 552 // This function will return only the most recent version of the flash plugin. | 552 // This function will return only the most recent version of the flash plugin. |
| 553 content::PepperPluginInfo* max_flash = | 553 content::PepperPluginInfo* max_flash = |
| 554 FindMostRecentPlugin(flash_versions.get()); | 554 FindMostRecentPlugin(flash_versions.get()); |
| 555 if (max_flash) { | 555 if (max_flash) { |
| 556 plugins->push_back(*max_flash); | 556 plugins->push_back(*max_flash); |
| 557 } else { | 557 } else { |
| 558 #if defined(GOOGLE_CHROME_BUILD) && defined(FLAPPER_AVAILABLE) | 558 #if defined(GOOGLE_CHROME_BUILD) && defined(FLAPPER_AVAILABLE) && \ |
| 559 !defined(OS_CHROMEOS) |
| 559 // Add a fake Flash plugin even though it doesn't actually exist - if a | 560 // Add a fake Flash plugin even though it doesn't actually exist - if a |
| 560 // web page requests it, it will be component-updated on-demand. There is | 561 // web page requests it, it will be component-updated on-demand. There is |
| 561 // nothing that guarantees the component update will give us the | 562 // nothing that guarantees the component update will give us the |
| 562 // FLAPPER_VERSION_STRING version of Flash, but using this version seems | 563 // FLAPPER_VERSION_STRING version of Flash, but using this version seems |
| 563 // better than any other hardcoded alternative. | 564 // better than any other hardcoded alternative. |
| 565 // Except for ChromeOS where Flash plugin is bundled. |
| 564 plugins->push_back(CreatePepperFlashInfo( | 566 plugins->push_back(CreatePepperFlashInfo( |
| 565 base::FilePath::FromUTF8Unsafe(ChromeContentClient::kNotPresent), | 567 base::FilePath::FromUTF8Unsafe(ChromeContentClient::kNotPresent), |
| 566 FLAPPER_VERSION_STRING, false, false, true)); | 568 FLAPPER_VERSION_STRING, false, false, true)); |
| 567 #endif // defined(GOOGLE_CHROME_BUILD) && defined(FLAPPER_AVAILABLE) | 569 #endif // defined(GOOGLE_CHROME_BUILD) && defined(FLAPPER_AVAILABLE) |
| 568 } | 570 } |
| 569 #endif // defined(ENABLE_PLUGINS) | 571 #endif // defined(ENABLE_PLUGINS) |
| 570 } | 572 } |
| 571 | 573 |
| 572 void ChromeContentClient::AddContentDecryptionModules( | 574 void ChromeContentClient::AddContentDecryptionModules( |
| 573 std::vector<content::CdmInfo>* cdms) { | 575 std::vector<content::CdmInfo>* cdms) { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); | 732 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); |
| 731 } | 733 } |
| 732 return origin_trial_policy_.get(); | 734 return origin_trial_policy_.get(); |
| 733 } | 735 } |
| 734 | 736 |
| 735 #if defined(OS_ANDROID) | 737 #if defined(OS_ANDROID) |
| 736 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 738 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
| 737 return new ChromeMediaClientAndroid(); | 739 return new ChromeMediaClientAndroid(); |
| 738 } | 740 } |
| 739 #endif // OS_ANDROID | 741 #endif // OS_ANDROID |
| OLD | NEW |