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

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: Pull changes from upstream Created 3 years, 9 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 7b583f3d925c93fb2262dfe584cde66183032842..32c1ba304aa19c817d2979fc3b973188e7c6b311 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 {
@@ -85,7 +86,18 @@ class CONTENT_EXPORT MediaStreamManager
// logging from webrtcLoggingPrivate API. Safe to call from any thread.
static void SendMessageToNativeLog(const std::string& message);
- explicit MediaStreamManager(media::AudioSystem* audio_system);
+ static std::unique_ptr<MediaStreamManager> CreateWithDefaults(
miu 2017/04/03 21:31:23 Perhaps include a comment about threading/task-run
chfremer 2017/04/04 21:59:32 I wouldn't know what to say here. As a reader, wha
+ media::AudioSystem* audio_system);
+
+ static std::unique_ptr<MediaStreamManager>
+ CreateWithCustomVideoCaptureDeviceTaskRunner(
miu 2017/04/03 21:31:23 Looks like nothing calls this. So, can we delete i
chfremer 2017/04/04 21:59:32 Done.
+ media::AudioSystem* audio_system,
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
+
+ static std::unique_ptr<MediaStreamManager> CreateWithCustomVideoCaptureSystem(
+ media::AudioSystem* audio_system,
+ std::unique_ptr<media::VideoCaptureSystem> video_capture_system,
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
~MediaStreamManager() override;
@@ -277,9 +289,14 @@ 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();
+ explicit MediaStreamManager(media::AudioSystem* audio_system);
+ void InitializeWithDefaults();
+ void InitializeWithCustomVideoCaptureDeviceTaskRunner(
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
+ void InitializeWithCustomVideoCaptureSystem(
+ std::unique_ptr<media::VideoCaptureSystem> video_capture_system,
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
+ void PerformCommonInitializationRoutines();
// |output_parameters| contains real values only if the request requires it.
void HandleAccessRequestResponse(

Powered by Google App Engine
This is Rietveld 408576698