OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_VIDEO_CAPTURE_PROVIDER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_VIDEO_CAPTURE_PROVIDER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_VIDEO_CAPTURE_PROVIDER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_VIDEO_CAPTURE_PROVIDER_H_ |
7 | 7 |
8 #include "content/browser/renderer_host/media/video_capture_provider.h" | 8 #include "content/browser/renderer_host/media/video_capture_provider.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 class MockVideoCaptureProvider : public VideoCaptureProvider { | 13 class MockVideoCaptureProvider : public VideoCaptureProvider { |
14 public: | 14 public: |
15 MockVideoCaptureProvider(); | 15 MockVideoCaptureProvider(); |
16 ~MockVideoCaptureProvider() override; | 16 ~MockVideoCaptureProvider() override; |
17 | 17 |
| 18 MOCK_METHOD0(Uninitialize, void()); |
18 MOCK_METHOD1(GetDeviceInfosAsync, | 19 MOCK_METHOD1(GetDeviceInfosAsync, |
19 void(const base::Callback< | 20 void(const base::Callback< |
20 void(const std::vector<media::VideoCaptureDeviceInfo>&)>& | 21 void(const std::vector<media::VideoCaptureDeviceInfo>&)>& |
21 result_callback)); | 22 result_callback)); |
22 | 23 |
23 MOCK_METHOD0(CreateDeviceLauncher, | 24 MOCK_METHOD0(CreateDeviceLauncher, |
24 std::unique_ptr<VideoCaptureDeviceLauncher>()); | 25 std::unique_ptr<VideoCaptureDeviceLauncher>()); |
25 }; | 26 }; |
26 | 27 |
27 class MockVideoCaptureDeviceLauncher : public VideoCaptureDeviceLauncher { | 28 class MockVideoCaptureDeviceLauncher : public VideoCaptureDeviceLauncher { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 92 |
92 void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id, | 93 void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id, |
93 base::OnceClosure done_cb) override { | 94 base::OnceClosure done_cb) override { |
94 DoSetDesktopCaptureWindowId(window_id, &done_cb); | 95 DoSetDesktopCaptureWindowId(window_id, &done_cb); |
95 } | 96 } |
96 }; | 97 }; |
97 | 98 |
98 } // namespace content | 99 } // namespace content |
99 | 100 |
100 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_VIDEO_CAPTURE_PROVIDER_H_ | 101 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_VIDEO_CAPTURE_PROVIDER_H_ |
OLD | NEW |