Index: chrome/browser/media/media_stream_devices_controller.cc |
diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc |
index 98a08f3f248a010514f6b774fc90f594e64a5365..dc0d0e8bbe436cf42364330c36b6636e2e8513b0 100644 |
--- a/chrome/browser/media/media_stream_devices_controller.cc |
+++ b/chrome/browser/media/media_stream_devices_controller.cc |
@@ -498,6 +498,11 @@ void MediaStreamDevicesController::RequestFinished() { |
} |
bool MediaStreamDevicesController::IsRequestAllowedByDefault() const { |
+ // If not all ancestors of the requesting frame have the same origin, do not |
+ // allow the request per default. |
+ if (!request_.all_ancestors_have_same_origin) |
+ return false; |
+ |
// The request from internal objects like chrome://URLs is always allowed. |
if (CheckAllowAllMediaStreamContentForOrigin(profile_, |
request_.security_origin)) { |