| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 {"javascript_header", IDS_JAVASCRIPT_HEADER}, | 322 {"javascript_header", IDS_JAVASCRIPT_HEADER}, |
| 323 {"javascriptAllow", IDS_JS_ALLOW_RADIO}, | 323 {"javascriptAllow", IDS_JS_ALLOW_RADIO}, |
| 324 {"javascriptBlock", IDS_JS_DONOTALLOW_RADIO}, | 324 {"javascriptBlock", IDS_JS_DONOTALLOW_RADIO}, |
| 325 // Plug-ins filter. | 325 // Plug-ins filter. |
| 326 {"pluginsTabLabel", IDS_PLUGIN_TAB_LABEL}, | 326 {"pluginsTabLabel", IDS_PLUGIN_TAB_LABEL}, |
| 327 {"plugins_header", IDS_PLUGIN_HEADER}, | 327 {"plugins_header", IDS_PLUGIN_HEADER}, |
| 328 {"pluginsAllow", IDS_PLUGIN_ALLOW_RADIO}, | 328 {"pluginsAllow", IDS_PLUGIN_ALLOW_RADIO}, |
| 329 {"pluginsDetect", IDS_PLUGIN_DETECT_RADIO}, | 329 {"pluginsDetect", IDS_PLUGIN_DETECT_RADIO}, |
| 330 {"pluginsAsk", IDS_PLUGIN_ASK_RADIO}, | 330 {"pluginsAsk", IDS_PLUGIN_ASK_RADIO}, |
| 331 {"pluginsBlock", IDS_PLUGIN_BLOCK_RADIO}, | 331 {"pluginsBlock", IDS_PLUGIN_BLOCK_RADIO}, |
| 332 {"disableIndividualPlugins", IDS_PLUGIN_SELECTIVE_DISABLE}, | 332 {"manageIndividualPlugins", IDS_PLUGIN_MANAGE_INDIVIDUAL}, |
| 333 // Pop-ups filter. | 333 // Pop-ups filter. |
| 334 {"popupsTabLabel", IDS_POPUP_TAB_LABEL}, | 334 {"popupsTabLabel", IDS_POPUP_TAB_LABEL}, |
| 335 {"popups_header", IDS_POPUP_HEADER}, | 335 {"popups_header", IDS_POPUP_HEADER}, |
| 336 {"popupsAllow", IDS_POPUP_ALLOW_RADIO}, | 336 {"popupsAllow", IDS_POPUP_ALLOW_RADIO}, |
| 337 {"popupsBlock", IDS_POPUP_BLOCK_RADIO}, | 337 {"popupsBlock", IDS_POPUP_BLOCK_RADIO}, |
| 338 // Location filter. | 338 // Location filter. |
| 339 {"locationTabLabel", IDS_GEOLOCATION_TAB_LABEL}, | 339 {"locationTabLabel", IDS_GEOLOCATION_TAB_LABEL}, |
| 340 {"location_header", IDS_GEOLOCATION_HEADER}, | 340 {"location_header", IDS_GEOLOCATION_HEADER}, |
| 341 {"locationAllow", IDS_GEOLOCATION_ALLOW_RADIO}, | 341 {"locationAllow", IDS_GEOLOCATION_ALLOW_RADIO}, |
| 342 {"locationAsk", IDS_GEOLOCATION_ASK_RADIO}, | 342 {"locationAsk", IDS_GEOLOCATION_ASK_RADIO}, |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 | 1585 |
| 1586 // Exceptions apply only when the feature is enabled. | 1586 // Exceptions apply only when the feature is enabled. |
| 1587 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1587 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
| 1588 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1588 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
| 1589 web_ui()->CallJavascriptFunction( | 1589 web_ui()->CallJavascriptFunction( |
| 1590 "ContentSettings.enableProtectedContentExceptions", | 1590 "ContentSettings.enableProtectedContentExceptions", |
| 1591 base::FundamentalValue(enable_exceptions)); | 1591 base::FundamentalValue(enable_exceptions)); |
| 1592 } | 1592 } |
| 1593 | 1593 |
| 1594 } // namespace options | 1594 } // namespace options |
| OLD | NEW |