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

Unified Diff: chrome/browser/ui/webui/options2/content_settings_handler2.cc

Issue 10537099: add "always allow" option to the mediastream infobar and allow user to allow/not allow acces to devi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/options2/content_settings_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/content_settings_handler2.cc b/chrome/browser/ui/webui/options2/content_settings_handler2.cc
index 1e27409db825e8f04ec5d4183aa9471479896527..c5436ed9d8f5dff688726fc92a001252b2a38823 100644
--- a/chrome/browser/ui/webui/options2/content_settings_handler2.cc
+++ b/chrome/browser/ui/webui/options2/content_settings_handler2.cc
@@ -80,6 +80,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"},
{CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"},
{CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"},
+ {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "mediastream"},
};
COMPILE_ASSERT(arraysize(kContentSettingsTypeGroupNames) ==
CONTENT_SETTINGS_NUM_TYPES,
@@ -334,6 +335,11 @@ void ContentSettingsHandler::GetLocalizedValues(
{ "protectedContentInfo", IDS_PROTECTED_CONTENT_INFO },
{ "protectedContentEnable", IDS_PROTECTED_CONTENT_ENABLE},
#endif // defined(OS_CHROMEOS)
+ // Media stream capture device filter.
+ { "mediastream_tab_label", IDS_MEDIA_STREAM_TAB_LABEL },
+ { "mediastream_header", IDS_MEDIA_STREAM_HEADER },
+ { "mediastream_ask", IDS_MEDIA_STREAM_ASK_RADIO },
+ { "mediastream_block", IDS_MEDIA_STREAM_BLOCK_RADIO },
};
RegisterStrings(localized_strings, resources, arraysize(resources));
@@ -360,6 +366,8 @@ void ContentSettingsHandler::GetLocalizedValues(
IDS_FULLSCREEN_TAB_LABEL);
RegisterTitle(localized_strings, "mouselock",
IDS_MOUSE_LOCK_TAB_LABEL);
+ RegisterTitle(localized_strings, "mediastream",
+ IDS_MEDIA_STREAM_TAB_LABEL);
Profile* profile = Profile::FromWebUI(web_ui());
localized_strings->SetBoolean(
@@ -549,7 +557,7 @@ void ContentSettingsHandler::UpdateOTRExceptionsViewFromModel(
case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
case CONTENT_SETTINGS_TYPE_INTENTS:
case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE:
- break;
+ case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
Bernhard Bauer 2012/06/11 18:16:00 You're removing a |break| here. Also, doesn't thi
no longer working on chromium 2012/06/14 13:03:25 Thanks, we should show the exceptions in incognito
default:
UpdateExceptionsViewFromOTRHostContentSettingsMap(type);
break;
@@ -857,6 +865,9 @@ void ContentSettingsHandler::SetContentFilter(const ListValue* args) {
content::RecordAction(
UserMetricsAction("Options_DefaultMouseLockSettingChanged"));
break;
+ case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
+ content::RecordAction(
+ UserMetricsAction("Options_DefaultMediaStreamSettingChanged"));
tommi (sloooow) - chröme 2012/06/11 20:59:21 add a break here for consistency with all the othe
no longer working on chromium 2012/06/14 13:03:25 Done.
default:
break;
}

Powered by Google App Engine
This is Rietveld 408576698