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

Unified Diff: content/renderer/media/media_devices_event_dispatcher.cc

Issue 2872913003: Do not pass the origin to MediaDevicesDispatcherHost. (Closed)
Patch Set: Add tests with unique origin Created 3 years, 7 months 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
Index: content/renderer/media/media_devices_event_dispatcher.cc
diff --git a/content/renderer/media/media_devices_event_dispatcher.cc b/content/renderer/media/media_devices_event_dispatcher.cc
index 6c4e0f19937473a11453cd31fff624bc9938c102..8cda5e9cfcd20d1575cce0c85b6126c117ca9b6b 100644
--- a/content/renderer/media/media_devices_event_dispatcher.cc
+++ b/content/renderer/media/media_devices_event_dispatcher.cc
@@ -37,14 +37,13 @@ MediaDevicesEventDispatcher::~MediaDevicesEventDispatcher() {}
MediaDevicesEventDispatcher::SubscriptionId
MediaDevicesEventDispatcher::SubscribeDeviceChangeNotifications(
MediaDeviceType type,
- const url::Origin& security_origin,
const MediaDevicesEventDispatcher::DevicesChangedCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(IsValidMediaDeviceType(type));
SubscriptionId subscription_id = ++current_id_;
GetMediaDevicesDispatcher()->SubscribeDeviceChangeNotifications(
- type, subscription_id, security_origin);
+ type, subscription_id);
SubscriptionList& subscriptions = device_change_subscriptions_[type];
subscriptions.push_back(Subscription{subscription_id, callback});
@@ -72,18 +71,17 @@ void MediaDevicesEventDispatcher::UnsubscribeDeviceChangeNotifications(
MediaDevicesEventDispatcher::SubscriptionIdList
MediaDevicesEventDispatcher::SubscribeDeviceChangeNotifications(
- const url::Origin& security_origin,
const DevicesChangedCallback& callback) {
SubscriptionIdList list;
SubscriptionId id;
id = SubscribeDeviceChangeNotifications(MEDIA_DEVICE_TYPE_AUDIO_INPUT,
- security_origin, callback);
+ callback);
list.push_back(id);
id = SubscribeDeviceChangeNotifications(MEDIA_DEVICE_TYPE_VIDEO_INPUT,
- security_origin, callback);
+ callback);
list.push_back(id);
id = SubscribeDeviceChangeNotifications(MEDIA_DEVICE_TYPE_AUDIO_OUTPUT,
- security_origin, callback);
+ callback);
list.push_back(id);
return list;

Powered by Google App Engine
This is Rietveld 408576698