enable_pepper_cdms is now a feature flag

So we should not define it anymore.
This commit is contained in:
Cheng Zhao 2017-01-23 15:51:23 +09:00 committed by Kevin Sawicki
parent c1df762656
commit 406224edff
8 changed files with 17 additions and 17 deletions

View file

@ -23,7 +23,7 @@
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "url/url_constants.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" #include "chrome/common/widevine_cdm_constants.h"
#endif #endif
@ -71,7 +71,7 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
return plugin; 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, content::PepperPluginInfo CreateWidevineCdmInfo(const base::FilePath& path,
const std::string& version) { const std::string& version) {
content::PepperPluginInfo widevine_cdm; content::PepperPluginInfo widevine_cdm;
@ -135,7 +135,7 @@ void AddPepperFlashFromCommandLine(
plugins->push_back(CreatePepperFlashInfo(flash_path, flash_version)); 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( void AddWidevineCdmFromCommandLine(
std::vector<content::PepperPluginInfo>* plugins) { std::vector<content::PepperPluginInfo>* plugins) {
auto command_line = base::CommandLine::ForCurrentProcess(); auto command_line = base::CommandLine::ForCurrentProcess();
@ -187,7 +187,7 @@ void AtomContentClient::AddAdditionalSchemes(
void AtomContentClient::AddPepperPlugins( void AtomContentClient::AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) { std::vector<content::PepperPluginInfo>* plugins) {
AddPepperFlashFromCommandLine(plugins); AddPepperFlashFromCommandLine(plugins);
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) #if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
AddWidevineCdmFromCommandLine(plugins); AddWidevineCdmFromCommandLine(plugins);
#endif #endif
} }

View file

@ -24,7 +24,7 @@ WidevineCdmMessageFilter::WidevineCdmMessageFilter(
bool WidevineCdmMessageFilter::OnMessageReceived(const IPC::Message& message) { bool WidevineCdmMessageFilter::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(WidevineCdmMessageFilter, message) IPC_BEGIN_MESSAGE_MAP(WidevineCdmMessageFilter, message)
#if defined(ENABLE_PEPPER_CDMS) #if BUILDFLAG(ENABLE_PEPPER_CDMS)
IPC_MESSAGE_HANDLER( IPC_MESSAGE_HANDLER(
ChromeViewHostMsg_IsInternalPluginAvailableForMimeType, ChromeViewHostMsg_IsInternalPluginAvailableForMimeType,
OnIsInternalPluginAvailableForMimeType) OnIsInternalPluginAvailableForMimeType)
@ -34,7 +34,7 @@ bool WidevineCdmMessageFilter::OnMessageReceived(const IPC::Message& message) {
return true; return true;
} }
#if defined(ENABLE_PEPPER_CDMS) #if BUILDFLAG(ENABLE_PEPPER_CDMS)
void WidevineCdmMessageFilter::OnIsInternalPluginAvailableForMimeType( void WidevineCdmMessageFilter::OnIsInternalPluginAvailableForMimeType(
const std::string& mime_type, const std::string& mime_type,
bool* is_available, bool* is_available,
@ -60,7 +60,7 @@ void WidevineCdmMessageFilter::OnIsInternalPluginAvailableForMimeType(
*is_available = false; *is_available = false;
} }
#endif // defined(ENABLE_PEPPER_CDMS) #endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
void WidevineCdmMessageFilter::OnDestruct() const { void WidevineCdmMessageFilter::OnDestruct() const {
BrowserThread::DeleteOnUIThread::Destruct(this); BrowserThread::DeleteOnUIThread::Destruct(this);

View file

@ -25,7 +25,7 @@ class WidevineCdmMessageFilter : public content::BrowserMessageFilter {
virtual ~WidevineCdmMessageFilter(); virtual ~WidevineCdmMessageFilter();
#if defined(ENABLE_PEPPER_CDMS) #if BUILDFLAG(ENABLE_PEPPER_CDMS)
// Returns whether any internal plugin supporting |mime_type| is registered // Returns whether any internal plugin supporting |mime_type| is registered
// and enabled. Does not determine whether the plugin can actually be // and enabled. Does not determine whether the plugin can actually be
// instantiated (e.g. whether it has all its dependencies). // instantiated (e.g. whether it has all its dependencies).

View file

@ -360,7 +360,7 @@ bool PathProvider(int key, base::FilePath* result) {
#endif #endif
cur = cur.Append(FILE_PATH_LITERAL("pnacl")); cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
break; 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) #if defined(WIDEVINE_CDM_IS_COMPONENT)
case chrome::DIR_COMPONENT_WIDEVINE_CDM: case chrome::DIR_COMPONENT_WIDEVINE_CDM:
if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
@ -376,7 +376,7 @@ bool PathProvider(int key, base::FilePath* result) {
return false; return false;
cur = cur.AppendASCII(kWidevineCdmAdapterFileName); cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
break; break;
#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) #endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
case chrome::FILE_RESOURCES_PACK: case chrome::FILE_RESOURCES_PACK:
#if defined(OS_MACOSX) && !defined(OS_IOS) #if defined(OS_MACOSX) && !defined(OS_IOS)
if (base::mac::AmIBundled()) { if (base::mac::AmIBundled()) {

View file

@ -13,7 +13,7 @@
// Renderer -> Browser messages. // Renderer -> Browser messages.
#if defined(ENABLE_PEPPER_CDMS) #if BUILDFLAG(ENABLE_PEPPER_CDMS)
// Returns whether any internal plugin supporting |mime_type| is registered and // Returns whether any internal plugin supporting |mime_type| is registered and
// enabled. Does not determine whether the plugin can actually be instantiated // enabled. Does not determine whether the plugin can actually be instantiated
// (e.g. whether it has all its dependencies). // (e.g. whether it has all its dependencies).

View file

@ -32,7 +32,7 @@
using media::KeySystemProperties; using media::KeySystemProperties;
using media::SupportedCodecs; using media::SupportedCodecs;
#if defined(ENABLE_PEPPER_CDMS) #if BUILDFLAG(ENABLE_PEPPER_CDMS)
static const char kExternalClearKeyPepperType[] = static const char kExternalClearKeyPepperType[] =
"application/x-ppapi-clearkey-cdm"; "application/x-ppapi-clearkey-cdm";
@ -264,15 +264,15 @@ static void AddPepperBasedWidevine(
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
} }
#endif // defined(WIDEVINE_CDM_AVAILABLE) #endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS) #endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
void AddChromeKeySystems( void AddChromeKeySystems(
std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) { std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) {
#if defined(ENABLE_PEPPER_CDMS) #if BUILDFLAG(ENABLE_PEPPER_CDMS)
AddExternalClearKey(key_systems_properties); AddExternalClearKey(key_systems_properties);
#if defined(WIDEVINE_CDM_AVAILABLE) #if defined(WIDEVINE_CDM_AVAILABLE)
AddPepperBasedWidevine(key_systems_properties); AddPepperBasedWidevine(key_systems_properties);
#endif // defined(WIDEVINE_CDM_AVAILABLE) #endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS) #endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
} }

View file

@ -225,8 +225,8 @@
'V8_USE_EXTERNAL_STARTUP_DATA', 'V8_USE_EXTERNAL_STARTUP_DATA',
'V8_SHARED', 'V8_SHARED',
'USING_V8_SHARED', 'USING_V8_SHARED',
# Remove this after enable_plugins becomes a feature flag.
'ENABLE_PLUGINS', 'ENABLE_PLUGINS',
'ENABLE_PEPPER_CDMS',
'USE_PROPRIETARY_CODECS', 'USE_PROPRIETARY_CODECS',
], ],
'sources': [ 'sources': [

2
vendor/brightray vendored

@ -1 +1 @@
Subproject commit e5b56b4497857734cc8cd4ac7c28a5c1684f071e Subproject commit 5f4cf42a6d8f611c859efdde20c085dcc4871919