Index: services/video_capture/device_factory_media_to_mojo_adapter.h |
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.h b/services/video_capture/device_factory_media_to_mojo_adapter.h |
index 6c10ff70dfd4359be006234ae1f5406d1b39a182..1eb16054097c632f78a43efbf90400d32ed8a36b 100644 |
--- a/services/video_capture/device_factory_media_to_mojo_adapter.h |
+++ b/services/video_capture/device_factory_media_to_mojo_adapter.h |
@@ -8,7 +8,7 @@ |
#include <map> |
#include "media/capture/video/video_capture_device_client.h" |
-#include "media/capture/video/video_capture_system.h" |
+#include "media/capture/video/video_capture_device_factory.h" |
#include "mojo/public/cpp/bindings/binding.h" |
#include "services/video_capture/public/interfaces/device_factory.mojom.h" |
@@ -16,14 +16,15 @@ |
class DeviceMediaToMojoAdapter; |
-// Wraps a media::VideoCaptureSystem and exposes its functionality through the |
-// mojom::DeviceFactory interface. Keeps track of device instances that have |
-// been created to ensure that it does not create more than one instance of the |
-// same media::VideoCaptureDevice at the same time. |
+// Wraps a media::VideoCaptureDeviceFactory and exposes its functionality |
+// through the mojom::DeviceFactory interface. |
+// Keeps track of device instances that have been created to ensure that |
+// it does not create more than one instance of the same |
+// media::VideoCaptureDevice at the same time. |
class DeviceFactoryMediaToMojoAdapter : public mojom::DeviceFactory { |
public: |
DeviceFactoryMediaToMojoAdapter( |
- std::unique_ptr<media::VideoCaptureSystem> capture_system, |
+ std::unique_ptr<media::VideoCaptureDeviceFactory> device_factory, |
const media::VideoCaptureJpegDecoderFactoryCB& |
jpeg_decoder_factory_callback); |
~DeviceFactoryMediaToMojoAdapter() override; |
@@ -50,7 +51,11 @@ |
void OnClientConnectionErrorOrClose(const std::string& device_id); |
- const std::unique_ptr<media::VideoCaptureSystem> capture_system_; |
+ // Returns false if no descriptor found. |
+ bool LookupDescriptorFromId(const std::string& device_id, |
+ media::VideoCaptureDeviceDescriptor* descriptor); |
+ |
+ const std::unique_ptr<media::VideoCaptureDeviceFactory> device_factory_; |
const media::VideoCaptureJpegDecoderFactoryCB jpeg_decoder_factory_callback_; |
std::map<std::string, ActiveDeviceEntry> active_devices_by_id_; |
}; |