Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: content/renderer/media/user_media_client_impl.h

Issue 2488843003: Reland of Use mojo support for Blink devicechange event. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/user_media_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 @@
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);
@@ -243,6 +244,11 @@
bool notify_dispatcher);
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.
@@ -259,6 +265,8 @@
LocalStreamSources local_sources_;
UserMediaRequests user_media_requests_;
+ MediaDevicesEventDispatcher::SubscriptionIdList
+ device_change_subscription_ids_;
blink::WebMediaDeviceChangeObserver media_device_change_observer_;
« no previous file with comments | « no previous file | content/renderer/media/user_media_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698