Chromium Code Reviews| 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) |