From 406224edffbb45f5508a7962ad23d7cf7e202169 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 23 Jan 2017 15:51:23 +0900 Subject: [PATCH] enable_pepper_cdms is now a feature flag So we should not define it anymore. --- atom/app/atom_content_client.cc | 8 ++++---- .../renderer_host/pepper/widevine_cdm_message_filter.cc | 6 +++--- .../renderer_host/pepper/widevine_cdm_message_filter.h | 2 +- chromium_src/chrome/common/chrome_paths.cc | 4 ++-- chromium_src/chrome/common/widevine_cdm_messages.h | 2 +- chromium_src/chrome/renderer/media/chrome_key_systems.cc | 8 ++++---- electron.gyp | 2 +- vendor/brightray | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/atom/app/atom_content_client.cc b/atom/app/atom_content_client.cc index a49b39e45cf3..760a42732b3a 100644 --- a/atom/app/atom_content_client.cc +++ b/atom/app/atom_content_client.cc @@ -23,7 +23,7 @@ #include "ui/base/l10n/l10n_util.h" #include "url/url_constants.h" -#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) #include "chrome/common/widevine_cdm_constants.h" #endif @@ -71,7 +71,7 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path, return plugin; } -#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) content::PepperPluginInfo CreateWidevineCdmInfo(const base::FilePath& path, const std::string& version) { content::PepperPluginInfo widevine_cdm; @@ -135,7 +135,7 @@ void AddPepperFlashFromCommandLine( plugins->push_back(CreatePepperFlashInfo(flash_path, flash_version)); } -#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) void AddWidevineCdmFromCommandLine( std::vector* plugins) { auto command_line = base::CommandLine::ForCurrentProcess(); @@ -187,7 +187,7 @@ void AtomContentClient::AddAdditionalSchemes( void AtomContentClient::AddPepperPlugins( std::vector* plugins) { AddPepperFlashFromCommandLine(plugins); -#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) AddWidevineCdmFromCommandLine(plugins); #endif } diff --git a/chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.cc b/chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.cc index c926b9e94aa7..62427e995463 100644 --- a/chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.cc +++ b/chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.cc @@ -24,7 +24,7 @@ WidevineCdmMessageFilter::WidevineCdmMessageFilter( bool WidevineCdmMessageFilter::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(WidevineCdmMessageFilter, message) -#if defined(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_PEPPER_CDMS) IPC_MESSAGE_HANDLER( ChromeViewHostMsg_IsInternalPluginAvailableForMimeType, OnIsInternalPluginAvailableForMimeType) @@ -34,7 +34,7 @@ bool WidevineCdmMessageFilter::OnMessageReceived(const IPC::Message& message) { return true; } -#if defined(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_PEPPER_CDMS) void WidevineCdmMessageFilter::OnIsInternalPluginAvailableForMimeType( const std::string& mime_type, bool* is_available, @@ -60,7 +60,7 @@ void WidevineCdmMessageFilter::OnIsInternalPluginAvailableForMimeType( *is_available = false; } -#endif // defined(ENABLE_PEPPER_CDMS) +#endif // BUILDFLAG(ENABLE_PEPPER_CDMS) void WidevineCdmMessageFilter::OnDestruct() const { BrowserThread::DeleteOnUIThread::Destruct(this); diff --git a/chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.h b/chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.h index b8f3d562ac78..6cd77fe57c5e 100644 --- a/chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.h +++ b/chromium_src/chrome/browser/renderer_host/pepper/widevine_cdm_message_filter.h @@ -25,7 +25,7 @@ class WidevineCdmMessageFilter : public content::BrowserMessageFilter { virtual ~WidevineCdmMessageFilter(); - #if defined(ENABLE_PEPPER_CDMS) + #if BUILDFLAG(ENABLE_PEPPER_CDMS) // Returns whether any internal plugin supporting |mime_type| is registered // and enabled. Does not determine whether the plugin can actually be // instantiated (e.g. whether it has all its dependencies). diff --git a/chromium_src/chrome/common/chrome_paths.cc b/chromium_src/chrome/common/chrome_paths.cc index d373315beb0b..009953ff5a3a 100644 --- a/chromium_src/chrome/common/chrome_paths.cc +++ b/chromium_src/chrome/common/chrome_paths.cc @@ -360,7 +360,7 @@ bool PathProvider(int key, base::FilePath* result) { #endif cur = cur.Append(FILE_PATH_LITERAL("pnacl")); break; -#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) +#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) #if defined(WIDEVINE_CDM_IS_COMPONENT) case chrome::DIR_COMPONENT_WIDEVINE_CDM: if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) @@ -376,7 +376,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; cur = cur.AppendASCII(kWidevineCdmAdapterFileName); break; -#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) +#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) case chrome::FILE_RESOURCES_PACK: #if defined(OS_MACOSX) && !defined(OS_IOS) if (base::mac::AmIBundled()) { diff --git a/chromium_src/chrome/common/widevine_cdm_messages.h b/chromium_src/chrome/common/widevine_cdm_messages.h index 17c908776b26..919c673c5670 100644 --- a/chromium_src/chrome/common/widevine_cdm_messages.h +++ b/chromium_src/chrome/common/widevine_cdm_messages.h @@ -13,7 +13,7 @@ // Renderer -> Browser messages. -#if defined(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_PEPPER_CDMS) // Returns whether any internal plugin supporting |mime_type| is registered and // enabled. Does not determine whether the plugin can actually be instantiated // (e.g. whether it has all its dependencies). diff --git a/chromium_src/chrome/renderer/media/chrome_key_systems.cc b/chromium_src/chrome/renderer/media/chrome_key_systems.cc index ef3ab52e59a0..206ac400fba8 100644 --- a/chromium_src/chrome/renderer/media/chrome_key_systems.cc +++ b/chromium_src/chrome/renderer/media/chrome_key_systems.cc @@ -32,7 +32,7 @@ using media::KeySystemProperties; using media::SupportedCodecs; -#if defined(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_PEPPER_CDMS) static const char kExternalClearKeyPepperType[] = "application/x-ppapi-clearkey-cdm"; @@ -264,15 +264,15 @@ static void AddPepperBasedWidevine( #endif // defined(OS_CHROMEOS) } #endif // defined(WIDEVINE_CDM_AVAILABLE) -#endif // defined(ENABLE_PEPPER_CDMS) +#endif // BUILDFLAG(ENABLE_PEPPER_CDMS) void AddChromeKeySystems( std::vector>* key_systems_properties) { -#if defined(ENABLE_PEPPER_CDMS) +#if BUILDFLAG(ENABLE_PEPPER_CDMS) AddExternalClearKey(key_systems_properties); #if defined(WIDEVINE_CDM_AVAILABLE) AddPepperBasedWidevine(key_systems_properties); #endif // defined(WIDEVINE_CDM_AVAILABLE) -#endif // defined(ENABLE_PEPPER_CDMS) +#endif // BUILDFLAG(ENABLE_PEPPER_CDMS) } diff --git a/electron.gyp b/electron.gyp index 9b55182d6245..7ab032532d45 100644 --- a/electron.gyp +++ b/electron.gyp @@ -225,8 +225,8 @@ 'V8_USE_EXTERNAL_STARTUP_DATA', 'V8_SHARED', 'USING_V8_SHARED', + # Remove this after enable_plugins becomes a feature flag. 'ENABLE_PLUGINS', - 'ENABLE_PEPPER_CDMS', 'USE_PROPRIETARY_CODECS', ], 'sources': [ diff --git a/vendor/brightray b/vendor/brightray index e5b56b449785..5f4cf42a6d8f 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit e5b56b4497857734cc8cd4ac7c28a5c1684f071e +Subproject commit 5f4cf42a6d8f611c859efdde20c085dcc4871919