OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/options/content_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // JavaScript filter. | 316 // JavaScript filter. |
317 { "javascriptTabLabel", IDS_JAVASCRIPT_TAB_LABEL }, | 317 { "javascriptTabLabel", IDS_JAVASCRIPT_TAB_LABEL }, |
318 { "javascript_header", IDS_JAVASCRIPT_HEADER }, | 318 { "javascript_header", IDS_JAVASCRIPT_HEADER }, |
319 { "javascriptAllow", IDS_JS_ALLOW_RADIO }, | 319 { "javascriptAllow", IDS_JS_ALLOW_RADIO }, |
320 { "javascriptBlock", IDS_JS_DONOTALLOW_RADIO }, | 320 { "javascriptBlock", IDS_JS_DONOTALLOW_RADIO }, |
321 // Plug-ins filter. | 321 // Plug-ins filter. |
322 { "pluginsTabLabel", IDS_PLUGIN_TAB_LABEL }, | 322 { "pluginsTabLabel", IDS_PLUGIN_TAB_LABEL }, |
323 { "plugins_header", IDS_PLUGIN_HEADER }, | 323 { "plugins_header", IDS_PLUGIN_HEADER }, |
324 { "pluginsAsk", IDS_PLUGIN_ASK_RADIO }, | 324 { "pluginsAsk", IDS_PLUGIN_ASK_RADIO }, |
325 { "pluginsAllow", IDS_PLUGIN_LOAD_RADIO }, | 325 { "pluginsAllow", IDS_PLUGIN_LOAD_RADIO }, |
326 { "pluginsBlock", IDS_PLUGIN_NOLOAD_RADIO }, | 326 { "pluginsBlock", IDS_PLUGIN_ASK_MENU_RADIO }, |
327 { "disableIndividualPlugins", IDS_PLUGIN_SELECTIVE_DISABLE }, | 327 { "disableIndividualPlugins", IDS_PLUGIN_SELECTIVE_DISABLE }, |
328 // Pop-ups filter. | 328 // Pop-ups filter. |
329 { "popupsTabLabel", IDS_POPUP_TAB_LABEL }, | 329 { "popupsTabLabel", IDS_POPUP_TAB_LABEL }, |
330 { "popups_header", IDS_POPUP_HEADER }, | 330 { "popups_header", IDS_POPUP_HEADER }, |
331 { "popupsAllow", IDS_POPUP_ALLOW_RADIO }, | 331 { "popupsAllow", IDS_POPUP_ALLOW_RADIO }, |
332 { "popupsBlock", IDS_POPUP_BLOCK_RADIO }, | 332 { "popupsBlock", IDS_POPUP_BLOCK_RADIO }, |
333 // Location filter. | 333 // Location filter. |
334 { "locationTabLabel", IDS_GEOLOCATION_TAB_LABEL }, | 334 { "locationTabLabel", IDS_GEOLOCATION_TAB_LABEL }, |
335 { "location_header", IDS_GEOLOCATION_HEADER }, | 335 { "location_header", IDS_GEOLOCATION_HEADER }, |
336 { "locationAllow", IDS_GEOLOCATION_ALLOW_RADIO }, | 336 { "locationAllow", IDS_GEOLOCATION_ALLOW_RADIO }, |
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 | 1498 |
1499 // Exceptions apply only when the feature is enabled. | 1499 // Exceptions apply only when the feature is enabled. |
1500 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1500 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
1501 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1501 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1502 web_ui()->CallJavascriptFunction( | 1502 web_ui()->CallJavascriptFunction( |
1503 "ContentSettings.enableProtectedContentExceptions", | 1503 "ContentSettings.enableProtectedContentExceptions", |
1504 base::FundamentalValue(enable_exceptions)); | 1504 base::FundamentalValue(enable_exceptions)); |
1505 } | 1505 } |
1506 | 1506 |
1507 } // namespace options | 1507 } // namespace options |
OLD | NEW |