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

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: Rebase on tot. 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..3c039f0f3a90184071309afd1ac1190ba66cb80f 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
Bernhard Bauer 2013/01/22 14:59:08 This comment reads a bit weird now. I think I'd pr
markusheintz_ 2013/01/23 10:42:30 Done.
+ // CONTENT_SETTINGS_TYPE_COOKIES and the CONTENT_SETTINGS_TYPE_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