| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 callback.Run(result); | 120 callback.Run(result); |
| 121 } | 121 } |
| 122 | 122 |
| 123 MOCK_METHOD3(SubscribeDeviceChangeNotifications, | 123 MOCK_METHOD3(SubscribeDeviceChangeNotifications, |
| 124 void(MediaDeviceType type, | 124 void(MediaDeviceType type, |
| 125 uint32_t subscription_id, | 125 uint32_t subscription_id, |
| 126 const url::Origin& security_origin)); | 126 const url::Origin& security_origin)); |
| 127 MOCK_METHOD2(UnsubscribeDeviceChangeNotifications, | 127 MOCK_METHOD2(UnsubscribeDeviceChangeNotifications, |
| 128 void(MediaDeviceType type, uint32_t subscription_id)); | 128 void(MediaDeviceType type, uint32_t subscription_id)); |
| 129 MOCK_METHOD2(GetVideoInputCapabilities, |
| 130 void(const url::Origin& security_origin, |
| 131 const GetVideoInputCapabilitiesCallback& client_callback)); |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 class UserMediaClientImplUnderTest : public UserMediaClientImpl { | 134 class UserMediaClientImplUnderTest : public UserMediaClientImpl { |
| 132 public: | 135 public: |
| 133 enum RequestState { | 136 enum RequestState { |
| 134 REQUEST_NOT_STARTED, | 137 REQUEST_NOT_STARTED, |
| 135 REQUEST_NOT_COMPLETE, | 138 REQUEST_NOT_COMPLETE, |
| 136 REQUEST_SUCCEEDED, | 139 REQUEST_SUCCEEDED, |
| 137 REQUEST_FAILED, | 140 REQUEST_FAILED, |
| 138 }; | 141 }; |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 blink::WebMediaConstraints audio_constraints = CreateDeviceConstraints( | 893 blink::WebMediaConstraints audio_constraints = CreateDeviceConstraints( |
| 891 nullptr, kInvalidDeviceId, kInvalidDeviceId, kFakeAudioInputDeviceId1); | 894 nullptr, kInvalidDeviceId, kInvalidDeviceId, kFakeAudioInputDeviceId1); |
| 892 blink::WebMediaConstraints video_constraints = CreateDeviceConstraints( | 895 blink::WebMediaConstraints video_constraints = CreateDeviceConstraints( |
| 893 nullptr, kInvalidDeviceId, kInvalidDeviceId, kFakeVideoInputDeviceId1); | 896 nullptr, kInvalidDeviceId, kInvalidDeviceId, kFakeVideoInputDeviceId1); |
| 894 TestValidRequestWithDeviceConstraints(audio_constraints, video_constraints, | 897 TestValidRequestWithDeviceConstraints(audio_constraints, video_constraints, |
| 895 kFakeAudioInputDeviceId1, | 898 kFakeAudioInputDeviceId1, |
| 896 kFakeVideoInputDeviceId1); | 899 kFakeVideoInputDeviceId1); |
| 897 } | 900 } |
| 898 | 901 |
| 899 } // namespace content | 902 } // namespace content |
| OLD | NEW |