Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1583)

Unified Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 2517953003: Move enable_webrtc to a buildflag header. (Closed)
Patch Set: Fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_blink_platform_impl.cc
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index e038d2bc1108721538e3841aff4aa289a18a7e2b..6f41e6dc2e9c9e386d112a4d2d5331d060945627 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -135,7 +135,7 @@
#define WebScrollbarBehaviorImpl blink::WebScrollbarBehavior
#endif
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
#include "content/renderer/media/rtc_certificate_generator.h"
#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
#endif
@@ -816,7 +816,7 @@ void RendererBlinkPlatformImpl::sampleGamepads(WebGamepads& gamepads) {
WebMediaRecorderHandler*
RendererBlinkPlatformImpl::createMediaRecorderHandler() {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
return new content::MediaRecorderHandler();
#else
return nullptr;
@@ -833,7 +833,7 @@ RendererBlinkPlatformImpl::createRTCPeerConnectionHandler(
if (!render_thread)
return NULL;
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
WebRTCPeerConnectionHandler* peer_connection_handler =
GetContentClient()->renderer()->OverrideCreateWebRTCPeerConnectionHandler(
client);
@@ -845,18 +845,18 @@ RendererBlinkPlatformImpl::createRTCPeerConnectionHandler(
return rtc_dependency_factory->CreateRTCPeerConnectionHandler(client);
#else
return NULL;
-#endif // defined(ENABLE_WEBRTC)
+#endif // BUILDFLAG(ENABLE_WEBRTC)
}
//------------------------------------------------------------------------------
blink::WebRTCCertificateGenerator*
RendererBlinkPlatformImpl::createRTCCertificateGenerator() {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
return new RTCCertificateGenerator();
#else
return nullptr;
-#endif // defined(ENABLE_WEBRTC)
+#endif // BUILDFLAG(ENABLE_WEBRTC)
}
//------------------------------------------------------------------------------
@@ -883,12 +883,12 @@ WebCanvasCaptureHandler* RendererBlinkPlatformImpl::createCanvasCaptureHandler(
const WebSize& size,
double frame_rate,
WebMediaStreamTrack* track) {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
return CanvasCaptureHandler::CreateCanvasCaptureHandler(
size, frame_rate, RenderThread::Get()->GetIOTaskRunner(), track);
#else
return nullptr;
-#endif // defined(ENABLE_WEBRTC)
+#endif // BUILDFLAG(ENABLE_WEBRTC)
}
//------------------------------------------------------------------------------
@@ -896,7 +896,7 @@ WebCanvasCaptureHandler* RendererBlinkPlatformImpl::createCanvasCaptureHandler(
void RendererBlinkPlatformImpl::createHTMLVideoElementCapturer(
WebMediaStream* web_media_stream,
WebMediaPlayer* web_media_player) {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
DCHECK(web_media_stream);
DCHECK(web_media_player);
AddVideoTrackToMediaStream(
@@ -911,7 +911,7 @@ void RendererBlinkPlatformImpl::createHTMLVideoElementCapturer(
void RendererBlinkPlatformImpl::createHTMLAudioElementCapturer(
WebMediaStream* web_media_stream,
WebMediaPlayer* web_media_player) {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
DCHECK(web_media_stream);
DCHECK(web_media_player);
@@ -941,11 +941,11 @@ void RendererBlinkPlatformImpl::createHTMLAudioElementCapturer(
WebImageCaptureFrameGrabber*
RendererBlinkPlatformImpl::createImageCaptureFrameGrabber() {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
return new ImageCaptureFrameGrabber();
#else
return nullptr;
-#endif // defined(ENABLE_WEBRTC)
+#endif // BUILDFLAG(ENABLE_WEBRTC)
}
//------------------------------------------------------------------------------
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698