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

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

Issue 2787703004: [Mojo Video Capture] Fix VideoCaptureManager exposing implementation details to clients (Closed)
Patch Set: Rebase to April 5 Created 3 years, 8 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.h
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h
index edc0cb623632dd4ff77b0451bb635464537dc185..b3a5cecf8d2fd01c9103f59cf24732e0535165b1 100644
--- a/content/browser/renderer_host/media/media_stream_manager.h
+++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -49,6 +49,7 @@
namespace media {
class AudioSystem;
+class VideoCaptureSystem;
}
namespace url {
@@ -87,6 +88,13 @@ class CONTENT_EXPORT MediaStreamManager
explicit MediaStreamManager(media::AudioSystem* audio_system);
+ // |audio_system| is required but defaults will be used if either
+ // |video_capture_system| or |device_task_runner| are null.
+ explicit MediaStreamManager(
+ media::AudioSystem* audio_system,
+ std::unique_ptr<media::VideoCaptureSystem> video_capture_system,
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
+
~MediaStreamManager() override;
// Used to access VideoCaptureManager.
@@ -273,9 +281,9 @@ class CONTENT_EXPORT MediaStreamManager
using LabeledDeviceRequest = std::pair<std::string, DeviceRequest*>;
using DeviceRequests = std::list<LabeledDeviceRequest>;
- // Initializes the device managers on IO thread. Auto-starts the device
- // thread and registers this as a listener with the device managers.
- void InitializeDeviceManagersOnIOThread();
+ void InitializeMaybeAsync(
+ std::unique_ptr<media::VideoCaptureSystem> video_capture_system,
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
// |output_parameters| contains real values only if the request requires it.
void HandleAccessRequestResponse(

Powered by Google App Engine
This is Rietveld 408576698