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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 exceptions_info_map.insert(std::make_pair( | 173 exceptions_info_map.insert(std::make_pair( |
174 CONTENT_SETTINGS_TYPE_MOUSELOCK, | 174 CONTENT_SETTINGS_TYPE_MOUSELOCK, |
175 ContentSettingWithExceptions( | 175 ContentSettingWithExceptions( |
176 true, | 176 true, |
177 UserMetricsAction("Options_DefaultMouseLockSettingChanged")))); | 177 UserMetricsAction("Options_DefaultMouseLockSettingChanged")))); |
178 exceptions_info_map.insert(std::make_pair( | 178 exceptions_info_map.insert(std::make_pair( |
179 CONTENT_SETTINGS_TYPE_PPAPI_BROKER, | 179 CONTENT_SETTINGS_TYPE_PPAPI_BROKER, |
180 ContentSettingWithExceptions( | 180 ContentSettingWithExceptions( |
181 true, | 181 true, |
182 UserMetricsAction("Options_DefaultPPAPIBrokerSettingChanged")))); | 182 UserMetricsAction("Options_DefaultPPAPIBrokerSettingChanged")))); |
183 exceptions_info_map.insert(std::make_pair( | |
184 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, | |
185 ContentSettingWithExceptions( | |
186 true, | |
187 UserMetricsAction("Options_DefaultPushMessagingSettingChanged")))); | |
188 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 183 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
189 exceptions_info_map.insert(std::make_pair( | 184 exceptions_info_map.insert(std::make_pair( |
190 CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, | 185 CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, |
191 ContentSettingWithExceptions( | 186 ContentSettingWithExceptions( |
192 true, | 187 true, |
193 UserMetricsAction( | 188 UserMetricsAction( |
194 "Options_DefaultProtectedMediaIdentifierSettingChanged")))); | 189 "Options_DefaultProtectedMediaIdentifierSettingChanged")))); |
195 #endif | 190 #endif |
196 exceptions_info_map.insert(std::make_pair( | 191 exceptions_info_map.insert(std::make_pair( |
197 CONTENT_SETTINGS_TYPE_KEYGEN, | 192 CONTENT_SETTINGS_TYPE_KEYGEN, |
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1645 | 1640 |
1646 // Exceptions apply only when the feature is enabled. | 1641 // Exceptions apply only when the feature is enabled. |
1647 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1642 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
1648 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1643 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1649 web_ui()->CallJavascriptFunctionUnsafe( | 1644 web_ui()->CallJavascriptFunctionUnsafe( |
1650 "ContentSettings.enableProtectedContentExceptions", | 1645 "ContentSettings.enableProtectedContentExceptions", |
1651 base::FundamentalValue(enable_exceptions)); | 1646 base::FundamentalValue(enable_exceptions)); |
1652 } | 1647 } |
1653 | 1648 |
1654 } // namespace options | 1649 } // namespace options |
OLD | NEW |