OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/renderer/media/user_media_client_impl.h" | 5 #include "content/renderer/media/user_media_client_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 device = ::mojom::VideoInputDeviceCapabilities::New(); | 154 device = ::mojom::VideoInputDeviceCapabilities::New(); |
155 device->device_id = kFakeVideoInputDeviceId2; | 155 device->device_id = kFakeVideoInputDeviceId2; |
156 device->facing_mode = ::mojom::FacingMode::ENVIRONMENT; | 156 device->facing_mode = ::mojom::FacingMode::ENVIRONMENT; |
157 device->formats.push_back(media::VideoCaptureFormat( | 157 device->formats.push_back(media::VideoCaptureFormat( |
158 gfx::Size(640, 480), 30.0f, media::PIXEL_FORMAT_I420)); | 158 gfx::Size(640, 480), 30.0f, media::PIXEL_FORMAT_I420)); |
159 result.push_back(std::move(device)); | 159 result.push_back(std::move(device)); |
160 | 160 |
161 std::move(client_callback).Run(std::move(result)); | 161 std::move(client_callback).Run(std::move(result)); |
162 } | 162 } |
163 | 163 |
| 164 void GetAudioInputCapabilities( |
| 165 const url::Origin& security_origin, |
| 166 GetAudioInputCapabilitiesCallback client_callback) override { |
| 167 NOTREACHED(); |
| 168 } |
| 169 |
164 MOCK_METHOD3(SubscribeDeviceChangeNotifications, | 170 MOCK_METHOD3(SubscribeDeviceChangeNotifications, |
165 void(MediaDeviceType type, | 171 void(MediaDeviceType type, |
166 uint32_t subscription_id, | 172 uint32_t subscription_id, |
167 const url::Origin& security_origin)); | 173 const url::Origin& security_origin)); |
168 MOCK_METHOD2(UnsubscribeDeviceChangeNotifications, | 174 MOCK_METHOD2(UnsubscribeDeviceChangeNotifications, |
169 void(MediaDeviceType type, uint32_t subscription_id)); | 175 void(MediaDeviceType type, uint32_t subscription_id)); |
170 }; | 176 }; |
171 | 177 |
172 class UserMediaClientImplUnderTest : public UserMediaClientImpl { | 178 class UserMediaClientImplUnderTest : public UserMediaClientImpl { |
173 public: | 179 public: |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 CreateDeviceConstraints(kFakeAudioInputDeviceId1); | 929 CreateDeviceConstraints(kFakeAudioInputDeviceId1); |
924 blink::WebMediaConstraints video_constraints = | 930 blink::WebMediaConstraints video_constraints = |
925 CreateFacingModeConstraints("environment"); | 931 CreateFacingModeConstraints("environment"); |
926 // kFakeVideoInputDeviceId2 has environment facing mode. | 932 // kFakeVideoInputDeviceId2 has environment facing mode. |
927 TestValidRequestWithConstraints(audio_constraints, video_constraints, | 933 TestValidRequestWithConstraints(audio_constraints, video_constraints, |
928 kFakeAudioInputDeviceId1, | 934 kFakeAudioInputDeviceId1, |
929 kFakeVideoInputDeviceId2); | 935 kFakeVideoInputDeviceId2); |
930 } | 936 } |
931 | 937 |
932 } // namespace content | 938 } // namespace content |
OLD | NEW |