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

Unified Diff: content/renderer/render_frame_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/pepper/resource_converter.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 824f1b636f0d3a2c3d07cf96e77a6f8afc320513..4b5efee258a68aa18baedd489352bdb3483c70a6 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -151,6 +151,7 @@
#include "media/blink/url_index.h"
#include "media/blink/webencryptedmediaclient_impl.h"
#include "media/blink/webmediaplayer_impl.h"
+#include "media/media_features.h"
#include "media/renderers/gpu_video_accelerator_factories.h"
#include "mojo/edk/js/core.h"
#include "mojo/edk/js/support.h"
@@ -216,7 +217,7 @@
#include "content/renderer/pepper/plugin_module.h"
#endif
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
#include "content/renderer/media/rtc_peer_connection_handler.h"
#endif
@@ -4423,7 +4424,7 @@ blink::WebPushClient* RenderFrameImpl::pushClient() {
void RenderFrameImpl::willStartUsingPeerConnectionHandler(
blink::WebRTCPeerConnectionHandler* handler) {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
static_cast<RTCPeerConnectionHandler*>(handler)->associateWithFrame(frame_);
#endif
}
@@ -5940,7 +5941,7 @@ void RenderFrameImpl::InitializeUserMediaClient() {
if (!RenderThreadImpl::current()) // Will be NULL during unit tests.
return;
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
DCHECK(!web_user_media_client_);
web_user_media_client_ = new UserMediaClientImpl(
this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(),
@@ -5954,7 +5955,7 @@ WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream(
WebMediaPlayerClient* client,
const WebString& sink_id,
const WebSecurityOrigin& security_origin) {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
RenderThreadImpl* const render_thread = RenderThreadImpl::current();
scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner =
@@ -5971,7 +5972,7 @@ WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream(
sink_id, security_origin);
#else
return NULL;
-#endif // defined(ENABLE_WEBRTC)
+#endif // BUILDFLAG(ENABLE_WEBRTC)
}
std::unique_ptr<MediaStreamRendererFactory>
@@ -5980,7 +5981,7 @@ RenderFrameImpl::CreateRendererFactory() {
GetContentClient()->renderer()->CreateMediaStreamRendererFactory();
if (factory.get())
return factory;
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
return std::unique_ptr<MediaStreamRendererFactory>(
new MediaStreamRendererFactoryImpl());
#else
« no previous file with comments | « content/renderer/pepper/resource_converter.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698