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 8374180ed8379cf9d8430212a14da950a3d04326..d3377b105966e63e57d1a2e263202e1a6f52736f 100644 |
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc |
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc |
@@ -205,7 +205,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_PPAPI_BROKER) |
return content_blocked_[content_type]; |
return false; |
@@ -223,9 +224,12 @@ 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 cookies |
+ /// and PPAPI broker. |
+ if (content_type != CONTENT_SETTINGS_TYPE_COOKIES && |
+ content_type != CONTENT_SETTINGS_TYPE_PPAPI_BROKER) { |
return false; |
+ } |
return content_accessed_[content_type]; |
} |
@@ -465,6 +469,14 @@ void TabSpecificContentSettings::ClearGeolocationContentSettings() { |
geolocation_settings_state_.ClearStateMap(); |
} |
+void TabSpecificContentSettings::SetPepperBrokerAllowed(bool allowed) { |
+ if (allowed) { |
+ OnContentAccessed(CONTENT_SETTINGS_TYPE_PPAPI_BROKER); |
+ } else { |
+ OnContentBlocked(CONTENT_SETTINGS_TYPE_PPAPI_BROKER, std::string()); |
+ } |
+} |
+ |
void TabSpecificContentSettings::RenderViewForInterstitialPageCreated( |
RenderViewHost* render_view_host) { |
// We want to tell the renderer-side code to ignore content settings for this |