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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
20 #include "chrome/browser/content_settings/content_settings_details.h" | |
21 #include "chrome/browser/content_settings/content_settings_provider.h" | |
22 #include "chrome/browser/content_settings/content_settings_utils.h" | 20 #include "chrome/browser/content_settings/content_settings_utils.h" |
23 #include "chrome/browser/content_settings/host_content_settings_map.h" | 21 #include "chrome/browser/content_settings/host_content_settings_map.h" |
24 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 22 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
25 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 23 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
26 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 24 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
27 #include "chrome/browser/notifications/desktop_notification_profile_util.h" | 25 #include "chrome/browser/notifications/desktop_notification_profile_util.h" |
28 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
29 #include "chrome/browser/ui/browser_list.h" | 27 #include "chrome/browser/ui/browser_list.h" |
30 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 29 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
32 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
33 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
34 #include "chrome/grit/generated_resources.h" | 32 #include "chrome/grit/generated_resources.h" |
35 #include "chrome/grit/locale_settings.h" | 33 #include "chrome/grit/locale_settings.h" |
34 #include "components/content_settings/core/browser/content_settings_details.h" | |
35 #include "components/content_settings/core/browser/content_settings_provider.h" | |
vabr (Chromium)
2014/09/18 09:57:10
You can drop this line, as in https://codereview.c
vasilii
2014/09/18 10:04:47
Done.
| |
36 #include "components/content_settings/core/common/content_settings.h" | 36 #include "components/content_settings/core/common/content_settings.h" |
37 #include "components/content_settings/core/common/content_settings_pattern.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" |
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1493 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1493 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
1494 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1494 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
1495 // Exceptions apply only when the feature is enabled. | 1495 // Exceptions apply only when the feature is enabled. |
1496 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1496 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1497 web_ui()->CallJavascriptFunction( | 1497 web_ui()->CallJavascriptFunction( |
1498 "ContentSettings.enableProtectedContentExceptions", | 1498 "ContentSettings.enableProtectedContentExceptions", |
1499 base::FundamentalValue(enable_exceptions)); | 1499 base::FundamentalValue(enable_exceptions)); |
1500 } | 1500 } |
1501 | 1501 |
1502 } // namespace options | 1502 } // namespace options |
OLD | NEW |