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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 27635002: Content settings for <audio> and <video>. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix. Created 6 years, 6 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/ui/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 1db488627240826ec44e452d91da3c33485313dd..1c753b8871523c2f53336189c8f06ee30b6890bf 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -93,6 +93,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{CONTENT_SETTINGS_TYPE_COOKIES, "cookies"},
{CONTENT_SETTINGS_TYPE_IMAGES, "images"},
{CONTENT_SETTINGS_TYPE_JAVASCRIPT, "javascript"},
+ {CONTENT_SETTINGS_TYPE_MEDIA, "media"},
{CONTENT_SETTINGS_TYPE_PLUGINS, "plugins"},
{CONTENT_SETTINGS_TYPE_POPUPS, "popups"},
{CONTENT_SETTINGS_TYPE_GEOLOCATION, "location"},
@@ -334,6 +335,11 @@ void ContentSettingsHandler::GetLocalizedValues(
{ "javascript_header", IDS_JAVASCRIPT_HEADER },
{ "javascript_allow", IDS_JS_ALLOW_RADIO },
{ "javascript_block", IDS_JS_DONOTALLOW_RADIO },
+ // Media (HTML5 <audio> and <video>) filter.
+ { "media_tab_label", IDS_MEDIA_TAB_LABEL },
+ { "media_header", IDS_MEDIA_HEADER },
+ { "media_allow", IDS_MEDIA_LOAD_RADIO },
+ { "media_block", IDS_MEDIA_NOLOAD_RADIO },
// Plug-ins filter.
{ "plugins_tab_label", IDS_PLUGIN_TAB_LABEL },
{ "plugins_header", IDS_PLUGIN_HEADER },
@@ -436,6 +442,8 @@ void ContentSettingsHandler::GetLocalizedValues(
IDS_IMAGES_TAB_LABEL);
RegisterTitle(localized_strings, "javascript",
IDS_JAVASCRIPT_TAB_LABEL);
+ RegisterTitle(localized_strings, "media",
+ IDS_MEDIA_TAB_LABEL);
RegisterTitle(localized_strings, "plugins",
IDS_PLUGIN_TAB_LABEL);
RegisterTitle(localized_strings, "popups",
@@ -1334,6 +1342,10 @@ void ContentSettingsHandler::SetContentFilter(const base::ListValue* args) {
content::RecordAction(
UserMetricsAction("Options_DefaultJavaScriptSettingChanged"));
break;
+ case CONTENT_SETTINGS_TYPE_MEDIA:
+ content::RecordAction(
+ UserMetricsAction("Options_DefaultMediaSettingChanged"));
+ break;
case CONTENT_SETTINGS_TYPE_PLUGINS:
content::RecordAction(
UserMetricsAction("Options_DefaultPluginsSettingChanged"));

Powered by Google App Engine
This is Rietveld 408576698