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

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

Issue 1362803002: Add logic to resolve permission mismatches in Android M for webrtc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add blankline Created 5 years, 3 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/media_stream_devices_controller.h
diff --git a/chrome/browser/media/media_stream_devices_controller.h b/chrome/browser/media/media_stream_devices_controller.h
index fd53d3076a95c9d219c2b92eef6643e7fe521372..21695ab4e381d8493cdac38861de853f1311f51a 100644
--- a/chrome/browser/media/media_stream_devices_controller.h
+++ b/chrome/browser/media/media_stream_devices_controller.h
@@ -34,11 +34,21 @@ class MediaStreamDevicesController : public PermissionBubbleRequest {
// Registers the prefs backing the audio and video policies.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
- // Public methods to be called by MediaStreamInfoBarDelegate;
+ bool IsAllowedForAudio() const;
+ bool IsAllowedForVideo() const;
bool IsAskingForAudio() const;
bool IsAskingForVideo() const;
const std::string& GetSecurityOriginSpec() const;
+ // Forces the permissions to be denied (without being persisted) regardless
+ // of what the previous state was. If the user had previously allowed the
+ // site video or audio access, this ignores that and informs the site it was
+ // denied.
+ //
+ // This differs from PermissionGranted/PermissionDenied as they only operate
+ // on the permissions if they are in the ASK state.
+ void ForcePermissionDeniedTemporarily();
+
// PermissionBubbleRequest:
int GetIconId() const override;
base::string16 GetMessageText() const override;
@@ -114,6 +124,8 @@ class MediaStreamDevicesController : public PermissionBubbleRequest {
// audio/video devices was granted or not.
content::MediaResponseCallback callback_;
+ // Whether the permissions granted or denied by the user should be persisted.
+ bool persist_permission_changes_;
DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController);
};
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_view.cc ('k') | chrome/browser/media/media_stream_devices_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698