| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/content_settings/core/browser/content_settings_registry.h" | 5 #include "components/content_settings/core/browser/content_settings_registry.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 WhitelistedSchemes(), | 181 WhitelistedSchemes(), |
| 182 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | 182 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, |
| 183 CONTENT_SETTING_ASK), | 183 CONTENT_SETTING_ASK), |
| 184 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 184 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 185 WebsiteSettingsRegistry::DESKTOP | | 185 WebsiteSettingsRegistry::DESKTOP | |
| 186 WebsiteSettingsRegistry::PLATFORM_ANDROID, | 186 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
| 187 // See also NotificationPermissionContext::DecidePermission which | 187 // See also NotificationPermissionContext::DecidePermission which |
| 188 // implements additional incognito exceptions. | 188 // implements additional incognito exceptions. |
| 189 ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW); | 189 ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW); |
| 190 | 190 |
| 191 Register(CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen", CONTENT_SETTING_ASK, | |
| 192 WebsiteSettingsInfo::SYNCABLE, | |
| 193 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), | |
| 194 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_ASK), | |
| 195 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE, | |
| 196 WebsiteSettingsRegistry::DESKTOP | | |
| 197 WebsiteSettingsRegistry::PLATFORM_ANDROID, | |
| 198 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | |
| 199 | |
| 200 Register(CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock", CONTENT_SETTING_ASK, | |
| 201 WebsiteSettingsInfo::SYNCABLE, | |
| 202 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), | |
| 203 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | |
| 204 CONTENT_SETTING_ASK), | |
| 205 WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE, | |
| 206 WebsiteSettingsRegistry::DESKTOP, | |
| 207 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | |
| 208 | |
| 209 Register(CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic", | 191 Register(CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic", |
| 210 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, | 192 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, |
| 211 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), | 193 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), |
| 212 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | 194 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, |
| 213 CONTENT_SETTING_ASK), | 195 CONTENT_SETTING_ASK), |
| 214 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 196 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 215 WebsiteSettingsRegistry::DESKTOP | | 197 WebsiteSettingsRegistry::DESKTOP | |
| 216 WebsiteSettingsRegistry::PLATFORM_ANDROID, | 198 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
| 217 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 199 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
| 218 | 200 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 if (!website_settings_info) | 339 if (!website_settings_info) |
| 358 return; | 340 return; |
| 359 | 341 |
| 360 DCHECK(!base::ContainsKey(content_settings_info_, type)); | 342 DCHECK(!base::ContainsKey(content_settings_info_, type)); |
| 361 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( | 343 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( |
| 362 website_settings_info, whitelisted_schemes, valid_settings, | 344 website_settings_info, whitelisted_schemes, valid_settings, |
| 363 incognito_behavior); | 345 incognito_behavior); |
| 364 } | 346 } |
| 365 | 347 |
| 366 } // namespace content_settings | 348 } // namespace content_settings |
| OLD | NEW |