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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 2867213004: [Mojo Video Capture] Hook up video capture service behind a feature flag (Closed)
Patch Set: Incorporate more suggestions from Patch Set 3 Created 3 years, 7 months 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/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 5818cef620e58357d7f789e52d61c7e64d4cb19e..9c52d6975899ad49737cc729eeadd9808e2018bf 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -33,7 +33,9 @@
#include "content/browser/renderer_host/media/media_devices_manager.h"
#include "content/browser/renderer_host/media/media_stream_requester.h"
#include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
+#include "content/browser/renderer_host/media/service_video_capture_provider.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
+#include "content/browser/renderer_host/media/video_capture_provider_switcher.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
@@ -52,6 +54,7 @@
#include "media/base/media_switches.h"
#include "media/capture/video/video_capture_device_factory.h"
#include "media/capture/video/video_capture_system_impl.h"
+#include "services/video_capture/public/cpp/constants.h"
#include "url/gurl.h"
#include "url/origin.h"
@@ -423,6 +426,12 @@ MediaStreamManager::MediaStreamManager(
media::VideoCaptureDeviceFactory::CreateFactory(
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))),
std::move(device_task_runner));
mcasas 2017/05/12 22:07:02 |device_task_runner| is unused if base::FeatureLi
chfremer 2017/05/12 23:30:21 Excellent point. Thanks for raising this. Unfortun
mcasas 2017/05/12 23:33:01 Follow up CL is fine.
+ if (base::FeatureList::IsEnabled(video_capture::kMojoVideoCapture)) {
+ DVLOG(3) << "Mojo video capture enabled";
mcasas 2017/05/12 22:07:02 nit: remove this.
chfremer 2017/05/12 23:30:21 Done.
+ video_capture_provider = base::MakeUnique<VideoCaptureProviderSwitcher>(
+ base::MakeUnique<ServiceVideoCaptureProvider>(),
+ std::move(video_capture_provider));
+ }
}
InitializeMaybeAsync(std::move(video_capture_provider));

Powered by Google App Engine
This is Rietveld 408576698