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_TEST_MOCK_DEVICE_FACTORY_H_ | 5 #ifndef SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_FACTORY_H_ |
6 #define SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_FACTORY_H_ | 6 #define SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_FACTORY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "media/capture/video/video_capture_device_factory.h" | 10 #include "media/capture/video/video_capture_device_factory.h" |
11 #include "mojo/public/cpp/bindings/binding.h" | 11 #include "mojo/public/cpp/bindings/binding.h" |
12 #include "services/video_capture/device_media_to_mojo_adapter.h" | 12 #include "services/video_capture/device_media_to_mojo_adapter.h" |
13 #include "services/video_capture/public/interfaces/device_descriptor.mojom.h" | |
14 | 13 |
15 namespace video_capture { | 14 namespace video_capture { |
16 | 15 |
17 // Implementation of media::VideoCaptureDeviceFactory that allows clients to | 16 // Implementation of media::VideoCaptureDeviceFactory that allows clients to |
18 // add mock devices. | 17 // add mock devices. |
19 class MockDeviceFactory : public media::VideoCaptureDeviceFactory { | 18 class MockDeviceFactory : public media::VideoCaptureDeviceFactory { |
20 public: | 19 public: |
21 MockDeviceFactory(); | 20 MockDeviceFactory(); |
22 ~MockDeviceFactory() override; | 21 ~MockDeviceFactory() override; |
23 | 22 |
(...skipping 10 matching lines...) Expand all Loading... |
34 media::VideoCaptureFormats* supported_formats) override; | 33 media::VideoCaptureFormats* supported_formats) override; |
35 | 34 |
36 private: | 35 private: |
37 std::map<media::VideoCaptureDeviceDescriptor, media::VideoCaptureDevice*> | 36 std::map<media::VideoCaptureDeviceDescriptor, media::VideoCaptureDevice*> |
38 devices_; | 37 devices_; |
39 }; | 38 }; |
40 | 39 |
41 } // namespace video_capture | 40 } // namespace video_capture |
42 | 41 |
43 #endif // SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_FACTORY_H_ | 42 #endif // SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_FACTORY_H_ |
OLD | NEW |