| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SERVICES_VIDEO_CAPTURE_DEVICE_CLIENT_MEDIA_TO_MOJO_ADAPTER_H_ | |
| 6 #define SERVICES_VIDEO_CAPTURE_DEVICE_CLIENT_MEDIA_TO_MOJO_ADAPTER_H_ | |
| 7 | |
| 8 #include "media/capture/video/video_capture_device.h" | |
| 9 #include "mojo/public/cpp/bindings/strong_binding.h" | |
| 10 #include "services/video_capture/public/interfaces/mock_video_capture_device.moj
om.h" | |
| 11 | |
| 12 namespace video_capture { | |
| 13 | |
| 14 // Adapter that allows a media::VideoCaptureDevice::Client to be used in place | |
| 15 // of a mojom::MockDeviceClient. Since the implemented interface | |
| 16 // MockDeviceClient is empty, its purpose is mostly to own the wrapped | |
| 17 // instance of media::VideoCaptureDevice::Client and keep it alive until the | |
| 18 // connection is closed. | |
| 19 class DeviceClientMediaToMojoAdapter : public mojom::MockDeviceClient { | |
| 20 public: | |
| 21 ~DeviceClientMediaToMojoAdapter() override; | |
| 22 | |
| 23 DeviceClientMediaToMojoAdapter( | |
| 24 std::unique_ptr<media::VideoCaptureDevice::Client> client); | |
| 25 | |
| 26 private: | |
| 27 std::unique_ptr<media::VideoCaptureDevice::Client> client_; | |
| 28 }; | |
| 29 | |
| 30 } // namespace video_capture | |
| 31 | |
| 32 #endif // SERVICES_VIDEO_CAPTURE_DEVICE_CLIENT_MEDIA_TO_MOJO_ADAPTER_H_ | |
| OLD | NEW |