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/content_settings_utils.h" | 22 #include "chrome/browser/content_settings/content_settings_utils.h" |
23 #include "chrome/browser/content_settings/host_content_settings_map.h" | 23 #include "chrome/browser/content_settings/host_content_settings_map.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/content_settings.h" | 31 #include "chrome/common/content_settings.h" |
32 #include "chrome/common/content_settings_pattern.h" | |
33 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 32 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
34 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
35 #include "chrome/common/url_constants.h" | 34 #include "chrome/common/url_constants.h" |
36 #include "chrome/grit/generated_resources.h" | 35 #include "chrome/grit/generated_resources.h" |
37 #include "chrome/grit/locale_settings.h" | 36 #include "chrome/grit/locale_settings.h" |
| 37 #include "components/content_settings/core/common/content_settings_pattern.h" |
38 #include "components/google/core/browser/google_util.h" | 38 #include "components/google/core/browser/google_util.h" |
39 #include "components/user_prefs/user_prefs.h" | 39 #include "components/user_prefs/user_prefs.h" |
40 #include "content/public/browser/notification_service.h" | 40 #include "content/public/browser/notification_service.h" |
41 #include "content/public/browser/notification_source.h" | 41 #include "content/public/browser/notification_source.h" |
42 #include "content/public/browser/notification_types.h" | 42 #include "content/public/browser/notification_types.h" |
43 #include "content/public/browser/user_metrics.h" | 43 #include "content/public/browser/user_metrics.h" |
44 #include "content/public/browser/web_contents.h" | 44 #include "content/public/browser/web_contents.h" |
45 #include "content/public/browser/web_ui.h" | 45 #include "content/public/browser/web_ui.h" |
46 #include "content/public/common/content_switches.h" | 46 #include "content/public/common/content_switches.h" |
47 #include "content/public/common/page_zoom.h" | 47 #include "content/public/common/page_zoom.h" |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1538 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
1539 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1539 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
1540 // Exceptions apply only when the feature is enabled. | 1540 // Exceptions apply only when the feature is enabled. |
1541 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1541 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1542 web_ui()->CallJavascriptFunction( | 1542 web_ui()->CallJavascriptFunction( |
1543 "ContentSettings.enableProtectedContentExceptions", | 1543 "ContentSettings.enableProtectedContentExceptions", |
1544 base::FundamentalValue(enable_exceptions)); | 1544 base::FundamentalValue(enable_exceptions)); |
1545 } | 1545 } |
1546 | 1546 |
1547 } // namespace options | 1547 } // namespace options |
OLD | NEW |