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

Unified Diff: chrome/browser/permissions/permission_infobar_delegate.cc

Issue 2341953004: Decouple MediaStreamInfoBarDelegate from GroupedPermissionInfoBarDelegate (Closed)
Patch Set: address review comments Created 4 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/permissions/permission_infobar_delegate.cc
diff --git a/chrome/browser/permissions/permission_infobar_delegate.cc b/chrome/browser/permissions/permission_infobar_delegate.cc
index 0c6d30f970979177b8bec6514f54501af634011a..f4883c3e67b181f1ea803b772767a39600c87a2c 100644
--- a/chrome/browser/permissions/permission_infobar_delegate.cc
+++ b/chrome/browser/permissions/permission_infobar_delegate.cc
@@ -37,8 +37,14 @@ PermissionInfoBarDelegate::PermissionInfoBarDelegate(
user_gesture_(user_gesture),
persist_(true) {}
+std::vector<int> PermissionInfoBarDelegate::content_settings() const {
+ return std::vector<int>(1, content_settings_type_);
+}
+
bool PermissionInfoBarDelegate::ShouldShowPersistenceToggle() const {
- return (permission_type_ == content::PermissionType::GEOLOCATION) &&
+ return (permission_type_ == content::PermissionType::GEOLOCATION ||
+ permission_type_ == content::PermissionType::AUDIO_CAPTURE ||
+ permission_type_ == content::PermissionType::VIDEO_CAPTURE) &&
PermissionUtil::ShouldShowPersistenceToggle();
}

Powered by Google App Engine
This is Rietveld 408576698