| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ | 5 #ifndef SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ |
| 6 #define SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ | 6 #define SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| 11 #include "services/video_capture/public/interfaces/mock_video_capture_device.moj
om.h" | 11 #include "services/video_capture/public/interfaces/mock_video_capture_device.moj
om.h" |
| 12 #include "services/video_capture/public/interfaces/video_capture_device_factory.
mojom.h" | 12 #include "services/video_capture/public/interfaces/video_capture_device_factory.
mojom.h" |
| 13 #include "services/video_capture/video_capture_device_proxy_impl.h" | 13 #include "services/video_capture/video_capture_device_proxy_impl.h" |
| 14 | 14 |
| 15 namespace video_capture { | 15 namespace video_capture { |
| 16 | 16 |
| 17 class VideoCaptureDeviceFactoryImpl : public mojom::VideoCaptureDeviceFactory { | 17 class VideoCaptureDeviceFactoryImpl : public mojom::VideoCaptureDeviceFactory { |
| 18 public: | 18 public: |
| 19 VideoCaptureDeviceFactoryImpl(); | 19 VideoCaptureDeviceFactoryImpl(const media::VideoCaptureJpegDecoderFactoryCB& |
| 20 jpeg_decoder_factory_callback); |
| 20 ~VideoCaptureDeviceFactoryImpl() override; | 21 ~VideoCaptureDeviceFactoryImpl() override; |
| 21 | 22 |
| 22 void AddMojoDevice(std::unique_ptr<VideoCaptureDeviceProxyImpl> device, | 23 void AddMojoDevice(std::unique_ptr<VideoCaptureDeviceProxyImpl> device, |
| 23 mojom::VideoCaptureDeviceDescriptorPtr descriptor); | 24 mojom::VideoCaptureDeviceDescriptorPtr descriptor); |
| 24 | 25 |
| 25 void AddMediaDevice(std::unique_ptr<media::VideoCaptureDevice> device, | 26 void AddMediaDevice(std::unique_ptr<media::VideoCaptureDevice> device, |
| 26 mojom::VideoCaptureDeviceDescriptorPtr descriptor); | 27 mojom::VideoCaptureDeviceDescriptorPtr descriptor); |
| 27 | 28 |
| 28 void AddMockDevice(mojom::MockVideoCaptureDevicePtr device, | 29 void AddMockDevice(mojom::MockVideoCaptureDevicePtr device, |
| 29 mojom::VideoCaptureDeviceDescriptorPtr descriptor); | 30 mojom::VideoCaptureDeviceDescriptorPtr descriptor); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 std::unique_ptr<VideoCaptureDeviceProxyImpl> device_proxy_; | 69 std::unique_ptr<VideoCaptureDeviceProxyImpl> device_proxy_; |
| 69 // TODO(chfremer) Use mojo::Binding<> directly instead of unique_ptr<> when | 70 // TODO(chfremer) Use mojo::Binding<> directly instead of unique_ptr<> when |
| 70 // mojo::Binding<> supports move operators. | 71 // mojo::Binding<> supports move operators. |
| 71 // https://crbug.com/644314 | 72 // https://crbug.com/644314 |
| 72 std::unique_ptr<mojo::Binding<mojom::VideoCaptureDeviceProxy>> binding_; | 73 std::unique_ptr<mojo::Binding<mojom::VideoCaptureDeviceProxy>> binding_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(DeviceEntry); | 75 DISALLOW_COPY_AND_ASSIGN(DeviceEntry); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 std::vector<DeviceEntry> devices_; | 78 std::vector<DeviceEntry> devices_; |
| 79 media::VideoCaptureJpegDecoderFactoryCB jpeg_decoder_factory_callback_; |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace video_capture | 82 } // namespace video_capture |
| 81 | 83 |
| 82 #endif // SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ | 84 #endif // SERVICES_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_FACTORY_IMPL_H_ |
| OLD | NEW |