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

Unified Diff: chrome/browser/media/webrtc/media_stream_devices_controller.h

Issue 2728573002: Hoist device logic out of permissions check in MediaStreamDevicesController (Closed)
Patch Set: Hoist device logic out of permissions check in MediaStreamDevicesController Created 3 years, 9 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: chrome/browser/media/webrtc/media_stream_devices_controller.h
diff --git a/chrome/browser/media/webrtc/media_stream_devices_controller.h b/chrome/browser/media/webrtc/media_stream_devices_controller.h
index 0e50282e8a18eeb9e66d393d998db9820f1ba28a..1777cd9b0e31fd1f9610b069259466169d75d41d 100644
--- a/chrome/browser/media/webrtc/media_stream_devices_controller.h
+++ b/chrome/browser/media/webrtc/media_stream_devices_controller.h
@@ -78,6 +78,7 @@ class MediaStreamDevicesController : public PermissionRequest {
std::unique_ptr<MediaStreamDevicesController> controller) = 0;
};
+ class MediaPermissionStatus;
class PermissionPromptDelegateImpl;
static void RequestPermissionsWithDelegate(
@@ -88,7 +89,8 @@ class MediaStreamDevicesController : public PermissionRequest {
MediaStreamDevicesController(content::WebContents* web_contents,
const content::MediaStreamRequest& request,
- const content::MediaResponseCallback& callback);
+ const content::MediaResponseCallback& callback,
+ const MediaPermissionStatus& initial_permission);
bool IsAllowedForAudio() const;
bool IsAllowedForVideo() const;
@@ -119,6 +121,8 @@ class MediaStreamDevicesController : public PermissionRequest {
ContentSetting GetContentSetting(
ContentSettingsType content_type,
const content::MediaStreamRequest& request,
+ bool was_requested,
+ bool was_initially_blocked,
content::MediaStreamRequestResult* denial_reason) const;
// Returns the content setting that should apply given an old content setting
« no previous file with comments | « chrome/browser/media/webrtc/media_permission.cc ('k') | chrome/browser/media/webrtc/media_stream_devices_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698