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

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

Issue 2885653002: [Mojo Video Capture] Do not instantiate in-process VideoCaptureSystem when using service (Closed)
Patch Set: Incorporate suggestions from PatchSet 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/in_process_video_capture_provider.h
diff --git a/content/browser/renderer_host/media/in_process_video_capture_provider.h b/content/browser/renderer_host/media/in_process_video_capture_provider.h
index 947d49454e2d383a3264f4c812ba9b1462439b27..29426732bd4721d542c2cbd37e3749c29675fb13 100644
--- a/content/browser/renderer_host/media/in_process_video_capture_provider.h
+++ b/content/browser/renderer_host/media/in_process_video_capture_provider.h
@@ -18,21 +18,31 @@ class CONTENT_EXPORT InProcessVideoCaptureProvider
InProcessVideoCaptureProvider(
std::unique_ptr<media::VideoCaptureSystem> video_capture_system,
scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
+
~InProcessVideoCaptureProvider() override;
+ static std::unique_ptr<VideoCaptureProvider>
+ CreateInstanceForNonDeviceCapture(
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
+
+ static std::unique_ptr<VideoCaptureProvider> CreateInstance(
+ std::unique_ptr<media::VideoCaptureSystem> video_capture_system,
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
+
void Uninitialize() override;
void GetDeviceInfosAsync(
- const base::Callback<void(
- const std::vector<media::VideoCaptureDeviceInfo>&)>& result_callback)
- override;
+ const GetDeviceInfosCallback& result_callback) override;
std::unique_ptr<VideoCaptureDeviceLauncher> CreateDeviceLauncher() override;
private:
+ // Can be nullptr.
const std::unique_ptr<media::VideoCaptureSystem> video_capture_system_;
// The message loop of media stream device thread, where VCD's live.
- scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
+ const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
+
+ base::SequenceChecker sequence_checker_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698