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

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

Issue 8585047: Add a section for the fullscreen JS API in the content settings page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable ask in content settings map Created 9 years, 1 month 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/host_content_settings_map.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc
index b0baa0425bf6024d7d1ca7959f192a8d9a8dfac3..5f63ee94f699e695eec52cd88c58fc5998f84412 100644
--- a/chrome/browser/content_settings/host_content_settings_map.cc
+++ b/chrome/browser/content_settings/host_content_settings_map.cc
@@ -310,6 +310,12 @@ bool HostContentSettingsMap::IsSettingAllowedForType(
switches::kEnableWebIntents))
return false;
+ // BLOCK semantics are not implemented for fullscreen.
jochen (gone - plz use gerrit) 2011/11/18 00:14:28 can you file a bug and add a TODO entry with a ref
koz (OOO until 15th September) 2011/11/18 00:24:50 Done.
+ if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN &&
+ setting == CONTENT_SETTING_BLOCK) {
+ return false;
+ }
+
// DEFAULT, ALLOW and BLOCK are always allowed.
if (setting == CONTENT_SETTING_DEFAULT ||
setting == CONTENT_SETTING_ALLOW ||
@@ -318,15 +324,15 @@ bool HostContentSettingsMap::IsSettingAllowedForType(
}
switch (content_type) {
case CONTENT_SETTINGS_TYPE_COOKIES:
- return (setting == CONTENT_SETTING_SESSION_ONLY);
+ return setting == CONTENT_SETTING_SESSION_ONLY;
case CONTENT_SETTINGS_TYPE_PLUGINS:
- return (setting == CONTENT_SETTING_ASK &&
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClickToPlay));
+ return setting == CONTENT_SETTING_ASK &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableClickToPlay);
case CONTENT_SETTINGS_TYPE_GEOLOCATION:
case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
case CONTENT_SETTINGS_TYPE_INTENTS:
- return (setting == CONTENT_SETTING_ASK);
+ return setting == CONTENT_SETTING_ASK;
default:
return false;
}

Powered by Google App Engine
This is Rietveld 408576698