| 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_TEST_H_ | 5 #ifndef SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_TEST_H_ |
| 6 #define SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_TEST_H_ | 6 #define SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_TEST_H_ |
| 7 | 7 |
| 8 #include "base/test/mock_callback.h" | 8 #include "base/test/mock_callback.h" |
| 9 #include "media/capture/video/video_capture_device.h" | 9 #include "media/capture/video/video_capture_device.h" |
| 10 #include "services/video_capture/device_factory_media_to_mojo_adapter.h" | 10 #include "services/video_capture/device_factory_media_to_mojo_adapter.h" |
| 11 #include "services/video_capture/public/cpp/capture_settings.h" | 11 #include "services/video_capture/public/cpp/capture_settings.h" |
| 12 #include "services/video_capture/public/interfaces/service.mojom.h" | 12 #include "services/video_capture/public/interfaces/service.mojom.h" |
| 13 #include "services/video_capture/test/mock_device_factory.h" | 13 #include "services/video_capture/test/mock_device_factory.h" |
| 14 #include "services/video_capture/test/mock_receiver.h" | 14 #include "services/video_capture/test/mock_receiver.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace base { |
| 18 class MessageLoop; |
| 19 } |
| 20 |
| 17 namespace video_capture { | 21 namespace video_capture { |
| 18 | 22 |
| 19 class MockDevice : public media::VideoCaptureDevice { | 23 class MockDevice : public media::VideoCaptureDevice { |
| 20 public: | 24 public: |
| 21 MockDevice(); | 25 MockDevice(); |
| 22 ~MockDevice() override; | 26 ~MockDevice() override; |
| 23 | 27 |
| 24 // media::VideoCaptureDevice: | 28 // media::VideoCaptureDevice: |
| 25 MOCK_METHOD2(DoAllocateAndStart, | 29 MOCK_METHOD2(DoAllocateAndStart, |
| 26 void(const media::VideoCaptureParams& params, | 30 void(const media::VideoCaptureParams& params, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 mojom::ReceiverPtr mock_receiver_proxy_; | 69 mojom::ReceiverPtr mock_receiver_proxy_; |
| 66 CaptureSettings requested_settings_; | 70 CaptureSettings requested_settings_; |
| 67 | 71 |
| 68 private: | 72 private: |
| 69 std::unique_ptr<base::MessageLoop> message_loop_; | 73 std::unique_ptr<base::MessageLoop> message_loop_; |
| 70 }; | 74 }; |
| 71 | 75 |
| 72 } // namespace video_capture | 76 } // namespace video_capture |
| 73 | 77 |
| 74 #endif // SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_TEST_H_ | 78 #endif // SERVICES_VIDEO_CAPTURE_TEST_MOCK_DEVICE_TEST_H_ |
| OLD | NEW |