Move enable_webrtc to a buildflag header.
Removes enable_webrtc from build/config/features.gni and puts it in
media/media_options.gni.
Converts the ENABLE_WEBRTC from a define set globally to being set in the
media_features.h generated buildflag header.
[email protected]
[email protected] (*_messages.h)
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Review URL: https://codereview.chromium.org/2517953003 .
Cr-Commit-Position: refs/heads/master@{#433912}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 414b4132..82f038b6 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -73,6 +73,7 @@
#include "gin/public/gin_features.h"
#include "media/audio/audio_features.h"
#include "media/base/media_switches.h"
+#include "media/media_features.h"
#include "media/midi/midi_switches.h"
#include "ppapi/features/features.h"
#include "printing/features/features.h"
@@ -615,7 +616,7 @@
switches::kSecurityChipAnimationAll},
};
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
const FeatureEntry::Choice kDisableWebRtcHWEncodingChoices[] = {
{IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
{IDS_FLAGS_WEBRTC_HW_ENCODING_ALL, switches::kDisableWebRtcHWEncoding, ""},
@@ -691,7 +692,7 @@
IDS_FLAGS_GL_COMPOSITED_TEXTURE_QUAD_BORDERS,
IDS_FLAGS_GL_COMPOSITED_TEXTURE_QUAD_BORDERS_DESCRIPTION, kOsAll,
SINGLE_VALUE_TYPE(cc::switches::kGlCompositedTextureQuadBorder)},
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
{"disable-webrtc-hw-decoding", IDS_FLAGS_WEBRTC_HW_DECODING_NAME,
IDS_FLAGS_WEBRTC_HW_DECODING_DESCRIPTION, kOsAndroid | kOsCrOS,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
@@ -1895,7 +1896,7 @@
IDS_FLAGS_ENABLE_NTP_FOREIGN_SESSIONS_SUGGESTIONS_DESCRIPTION, kOsAndroid,
FEATURE_VALUE_TYPE(ntp_snippets::kForeignSessionsSuggestionsFeature)},
#endif // OS_ANDROID
-#if defined(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) && \
+#if BUILDFLAG(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) && \
!defined(MEDIA_DISABLE_FFMPEG)
{"enable-webrtc-h264-with-openh264-ffmpeg",
IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_NAME,