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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 11896028: Add an location bar icon and a content settings bubble for media settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser test Created 7 years, 11 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/content_settings/tab_specific_content_settings.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index caf6c12ccd671e6018cc25da82454252ba6d1164..39b6e867d835fd760ab0b93a68c90acd545287d8 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -206,7 +206,8 @@ bool TabSpecificContentSettings::IsContentBlocked(
content_type == CONTENT_SETTINGS_TYPE_PLUGINS ||
content_type == CONTENT_SETTINGS_TYPE_COOKIES ||
content_type == CONTENT_SETTINGS_TYPE_POPUPS ||
- content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT)
+ content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT ||
+ content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM)
return content_blocked_[content_type];
return false;
@@ -224,8 +225,10 @@ void TabSpecificContentSettings::SetBlockageHasBeenIndicated(
bool TabSpecificContentSettings::IsContentAccessed(
ContentSettingsType content_type) const {
- // This method currently only returns meaningful values for cookies.
- if (content_type != CONTENT_SETTINGS_TYPE_COOKIES)
+ // This method currently only returns meaningful values for the content type
+ // cookies and mediastream.
+ if (content_type != CONTENT_SETTINGS_TYPE_COOKIES &&
+ content_type != CONTENT_SETTINGS_TYPE_MEDIASTREAM)
return false;
return content_accessed_[content_type];
@@ -422,6 +425,10 @@ void TabSpecificContentSettings::OnGeolocationPermissionSet(
content::NotificationService::NoDetails());
}
+void TabSpecificContentSettings::OnMediaStreamAccessed() {
+ OnContentAccessed(CONTENT_SETTINGS_TYPE_MEDIASTREAM);
+}
+
void TabSpecificContentSettings::ClearBlockedContentSettingsExceptForCookies() {
for (size_t i = 0; i < arraysize(content_blocked_); ++i) {
if (i == CONTENT_SETTINGS_TYPE_COOKIES)

Powered by Google App Engine
This is Rietveld 408576698