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

Unified Diff: chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge 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: chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc
diff --git a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc
index e4177e3186a426cc87f7c547423d6949a8450e33..197cbe28c72c6c6d21251e5fe4376744ca768021 100644
--- a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc
@@ -31,13 +31,14 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/media_stream_request.h"
#include "extensions/common/constants.h"
+#include "extensions/features/features.h"
#include "media/base/media_switches.h"
#if defined(OS_CHROMEOS)
#include "ash/shell.h"
#endif // defined(OS_CHROMEOS)
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/media/extension_media_access_handler.h"
#include "chrome/browser/media/webrtc/desktop_capture_access_handler.h"
#include "chrome/browser/media/webrtc/tab_capture_access_handler.h"
@@ -65,7 +66,7 @@ const content::MediaStreamDevice* FindDeviceWithId(
return NULL;
}
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
inline CaptureAccessHandlerBase* ToCaptureAccessHandlerBase(
MediaAccessHandler* handler) {
return static_cast<CaptureAccessHandlerBase*>(handler);
@@ -82,7 +83,7 @@ MediaCaptureDevicesDispatcher::MediaCaptureDevicesDispatcher()
media_stream_capture_indicator_(new MediaStreamCaptureIndicator()) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
media_access_handlers_.push_back(new ExtensionMediaAccessHandler());
media_access_handlers_.push_back(new DesktopCaptureAccessHandler());
media_access_handlers_.push_back(new TabCaptureAccessHandler());
@@ -376,7 +377,7 @@ bool MediaCaptureDevicesDispatcher::IsInsecureCapturingInProgress(
int render_process_id,
int render_frame_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
for (MediaAccessHandler* handler : media_access_handlers_) {
if (handler->SupportsStreamType(content::MEDIA_DESKTOP_VIDEO_CAPTURE,
nullptr) ||
@@ -430,7 +431,7 @@ void MediaCaptureDevicesDispatcher::UpdateCapturingLinkSecured(
stream_type != content::MEDIA_DESKTOP_VIDEO_CAPTURE)
return;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
for (MediaAccessHandler* handler : media_access_handlers_) {
if (handler->SupportsStreamType(stream_type, nullptr)) {
ToCaptureAccessHandlerBase(handler)->UpdateCapturingLinkSecured(
« no previous file with comments | « chrome/browser/media/router/media_router_feature.cc ('k') | chrome/browser/media/webrtc/media_stream_capture_indicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698