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

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

Issue 11488009: Add content settings page action for Pepper broker authorization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 10 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 39b6e867d835fd760ab0b93a68c90acd545287d8..fb986672c00f9b3c9f541bbd16081a706f203db5 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -207,7 +207,8 @@ bool TabSpecificContentSettings::IsContentBlocked(
content_type == CONTENT_SETTINGS_TYPE_COOKIES ||
content_type == CONTENT_SETTINGS_TYPE_POPUPS ||
content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT ||
- content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM)
+ content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM ||
+ content_type == CONTENT_SETTINGS_TYPE_PPAPI_BROKER)
return content_blocked_[content_type];
return false;
@@ -226,10 +227,12 @@ void TabSpecificContentSettings::SetBlockageHasBeenIndicated(
bool TabSpecificContentSettings::IsContentAccessed(
ContentSettingsType content_type) const {
// This method currently only returns meaningful values for the content type
- // cookies and mediastream.
+ // cookies, mediastream, and PPAPI broker.
if (content_type != CONTENT_SETTINGS_TYPE_COOKIES &&
- content_type != CONTENT_SETTINGS_TYPE_MEDIASTREAM)
+ content_type != CONTENT_SETTINGS_TYPE_MEDIASTREAM &&
+ content_type != CONTENT_SETTINGS_TYPE_PPAPI_BROKER) {
return false;
+ }
return content_accessed_[content_type];
}
@@ -475,6 +478,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
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.h ('k') | chrome/browser/pepper_broker_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698