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

Unified Diff: content/renderer/pepper/content_renderer_pepper_host_factory.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
Index: content/renderer/pepper/content_renderer_pepper_host_factory.cc
diff --git a/content/renderer/pepper/content_renderer_pepper_host_factory.cc b/content/renderer/pepper/content_renderer_pepper_host_factory.cc
index c6ed8c6ca28a27d9eb29db4f26243385d8d60f5c..16eff2bccc97bf585a295b4f14a4361ce28cf998 100644
--- a/content/renderer/pepper/content_renderer_pepper_host_factory.cc
+++ b/content/renderer/pepper/content_renderer_pepper_host_factory.cc
@@ -32,6 +32,7 @@
#include "content/renderer/pepper/pepper_websocket_host.h"
#include "content/renderer/pepper/ppb_image_data_impl.h"
#include "content/renderer/pepper/renderer_ppapi_host_impl.h"
+#include "media/media_features.h"
#include "ppapi/host/resource_host.h"
#include "ppapi/proxy/ppapi_message_utils.h"
#include "ppapi/proxy/ppapi_messages.h"
@@ -52,7 +53,7 @@ namespace content {
namespace {
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
bool CanUseMediaStreamAPI(const RendererPpapiHost* host, PP_Instance instance) {
blink::WebPluginContainer* container =
host->GetContainerForInstance(instance);
@@ -64,7 +65,7 @@ bool CanUseMediaStreamAPI(const RendererPpapiHost* host, PP_Instance instance) {
GetContentClient()->renderer();
return content_renderer_client->AllowPepperMediaStreamAPI(document_url);
}
-#endif // defined(ENABLE_WEBRTC)
+#endif // BUILDFLAG(ENABLE_WEBRTC)
static bool CanUseCameraDeviceAPI(const RendererPpapiHost* host,
PP_Instance instance) {
@@ -183,7 +184,7 @@ ContentRendererPepperHostFactory::CreateResourceHost(
resource);
case PpapiHostMsg_WebSocket_Create::ID:
return base::MakeUnique<PepperWebSocketHost>(host_, instance, resource);
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
case PpapiHostMsg_MediaStreamVideoTrack_Create::ID:
return base::MakeUnique<PepperMediaStreamVideoTrackHost>(host_, instance,
resource);
@@ -198,7 +199,7 @@ ContentRendererPepperHostFactory::CreateResourceHost(
if (CanUseMediaStreamAPI(host_, instance))
return base::MakeUnique<PepperVideoSourceHost>(host_, instance,
resource);
-#endif // defined(ENABLE_WEBRTC)
+#endif // BUILDFLAG(ENABLE_WEBRTC)
}
// Dev interfaces.
« no previous file with comments | « content/renderer/media/rtc_certificate_generator.cc ('k') | content/renderer/pepper/pepper_media_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698