Index: content/renderer/media/user_media_client_impl.h |
diff --git a/content/renderer/media/user_media_client_impl.h b/content/renderer/media/user_media_client_impl.h |
index 22ddb69bea04d6d191f0c493440f0c34af8ae320..6931e7b69589e295f47011aeb0f425123e26832c 100644 |
--- a/content/renderer/media/user_media_client_impl.h |
+++ b/content/renderer/media/user_media_client_impl.h |
@@ -19,6 +19,7 @@ |
#include "content/common/media/media_devices.h" |
#include "content/common/media/media_devices.mojom.h" |
#include "content/public/renderer/render_frame_observer.h" |
+#include "content/renderer/media/media_devices_event_dispatcher.h" |
#include "content/renderer/media/media_stream_dispatcher_eventhandler.h" |
#include "content/renderer/media/media_stream_source.h" |
#include "services/service_manager/public/cpp/interface_provider.h" |
@@ -224,7 +225,7 @@ class CONTENT_EXPORT UserMediaClientImpl |
const StreamDeviceInfoArray& audio_array, |
const StreamDeviceInfoArray& video_array); |
- using EnumerationResult = std::vector<std::vector<MediaDeviceInfo>>; |
+ using EnumerationResult = std::vector<MediaDeviceInfoArray>; |
void FinalizeEnumerateDevices(blink::WebMediaDevicesRequest request, |
const EnumerationResult& result); |
@@ -244,6 +245,11 @@ class CONTENT_EXPORT UserMediaClientImpl |
const ::mojom::MediaDevicesDispatcherHostPtr& GetMediaDevicesDispatcher(); |
+ // Callback invoked by MediaDevicesEventDispatcher when a device-change |
+ // notification arrives. |
+ void DevicesChanged(MediaDeviceType device_type, |
+ const MediaDeviceInfoArray& device_infos); |
+ |
// Weak ref to a PeerConnectionDependencyFactory, owned by the RenderThread. |
// It's valid for the lifetime of RenderThread. |
// TODO(xians): Remove this dependency once audio do not need it for local |
@@ -259,6 +265,8 @@ class CONTENT_EXPORT UserMediaClientImpl |
LocalStreamSources local_sources_; |
UserMediaRequests user_media_requests_; |
+ MediaDevicesEventDispatcher::SubscriptionIdList |
+ device_change_subscription_ids_; |
blink::WebMediaDeviceChangeObserver media_device_change_observer_; |