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 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 22 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
23 #include "chrome/browser/content_settings/web_site_settings_uma_util.h" | 23 #include "chrome/browser/content_settings/web_site_settings_uma_util.h" |
24 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 24 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
25 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 25 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
26 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 26 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
27 #include "chrome/browser/notifications/desktop_notification_profile_util.h" | 27 #include "chrome/browser/notifications/desktop_notification_profile_util.h" |
28 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
29 #include "chrome/browser/ui/browser_list.h" | 29 #include "chrome/browser/ui/browser_list.h" |
30 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 31 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
32 #include "chrome/common/features.h" | |
33 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
34 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
35 #include "chrome/grit/generated_resources.h" | 34 #include "chrome/grit/generated_resources.h" |
36 #include "chrome/grit/locale_settings.h" | 35 #include "chrome/grit/locale_settings.h" |
37 #include "components/content_settings/core/browser/content_settings_details.h" | 36 #include "components/content_settings/core/browser/content_settings_details.h" |
38 #include "components/content_settings/core/browser/content_settings_utils.h" | 37 #include "components/content_settings/core/browser/content_settings_utils.h" |
39 #include "components/content_settings/core/browser/host_content_settings_map.h" | 38 #include "components/content_settings/core/browser/host_content_settings_map.h" |
40 #include "components/content_settings/core/browser/plugins_field_trial.h" | 39 #include "components/content_settings/core/browser/plugins_field_trial.h" |
41 #include "components/content_settings/core/browser/website_settings_info.h" | 40 #include "components/content_settings/core/browser/website_settings_info.h" |
42 #include "components/content_settings/core/browser/website_settings_registry.h" | 41 #include "components/content_settings/core/browser/website_settings_registry.h" |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 // Cookies filter. | 444 // Cookies filter. |
446 {"cookiesTabLabel", IDS_COOKIES_TAB_LABEL}, | 445 {"cookiesTabLabel", IDS_COOKIES_TAB_LABEL}, |
447 {"cookiesHeader", IDS_COOKIES_HEADER}, | 446 {"cookiesHeader", IDS_COOKIES_HEADER}, |
448 {"cookiesAllow", IDS_COOKIES_ALLOW_RADIO}, | 447 {"cookiesAllow", IDS_COOKIES_ALLOW_RADIO}, |
449 {"cookiesBlock", IDS_COOKIES_BLOCK_RADIO}, | 448 {"cookiesBlock", IDS_COOKIES_BLOCK_RADIO}, |
450 {"cookiesSessionOnly", IDS_COOKIES_SESSION_ONLY_RADIO}, | 449 {"cookiesSessionOnly", IDS_COOKIES_SESSION_ONLY_RADIO}, |
451 {"cookiesBlock3rdParty", IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX}, | 450 {"cookiesBlock3rdParty", IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX}, |
452 {"cookiesShowCookies", IDS_COOKIES_SHOW_COOKIES_BUTTON}, | 451 {"cookiesShowCookies", IDS_COOKIES_SHOW_COOKIES_BUTTON}, |
453 {"flashStorageSettings", IDS_FLASH_STORAGE_SETTINGS}, | 452 {"flashStorageSettings", IDS_FLASH_STORAGE_SETTINGS}, |
454 {"flashStorageUrl", IDS_FLASH_STORAGE_URL}, | 453 {"flashStorageUrl", IDS_FLASH_STORAGE_URL}, |
455 #if BUILDFLAG(ENABLE_GOOGLE_NOW) | 454 #if defined(ENABLE_GOOGLE_NOW) |
456 {"googleGeolocationAccessEnable", | 455 {"googleGeolocationAccessEnable", |
457 IDS_GEOLOCATION_GOOGLE_ACCESS_ENABLE_CHKBOX}, | 456 IDS_GEOLOCATION_GOOGLE_ACCESS_ENABLE_CHKBOX}, |
458 #endif | 457 #endif |
459 // Image filter. | 458 // Image filter. |
460 {"imagesTabLabel", IDS_IMAGES_TAB_LABEL}, | 459 {"imagesTabLabel", IDS_IMAGES_TAB_LABEL}, |
461 {"imagesHeader", IDS_IMAGES_HEADER}, | 460 {"imagesHeader", IDS_IMAGES_HEADER}, |
462 {"imagesAllow", IDS_IMAGES_LOAD_RADIO}, | 461 {"imagesAllow", IDS_IMAGES_LOAD_RADIO}, |
463 {"imagesBlock", IDS_IMAGES_NOLOAD_RADIO}, | 462 {"imagesBlock", IDS_IMAGES_NOLOAD_RADIO}, |
464 // JavaScript filter. | 463 // JavaScript filter. |
465 {"javascriptTabLabel", IDS_JAVASCRIPT_TAB_LABEL}, | 464 {"javascriptTabLabel", IDS_JAVASCRIPT_TAB_LABEL}, |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 | 1679 |
1681 // Exceptions apply only when the feature is enabled. | 1680 // Exceptions apply only when the feature is enabled. |
1682 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1681 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
1683 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1682 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1684 web_ui()->CallJavascriptFunction( | 1683 web_ui()->CallJavascriptFunction( |
1685 "ContentSettings.enableProtectedContentExceptions", | 1684 "ContentSettings.enableProtectedContentExceptions", |
1686 base::FundamentalValue(enable_exceptions)); | 1685 base::FundamentalValue(enable_exceptions)); |
1687 } | 1686 } |
1688 | 1687 |
1689 } // namespace options | 1688 } // namespace options |
OLD | NEW |