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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 318 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
319 | 319 |
320 Register(CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, "bluetooth-guard", | 320 Register(CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, "bluetooth-guard", |
321 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, | 321 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, |
322 WhitelistedSchemes(), | 322 WhitelistedSchemes(), |
323 ValidSettings(CONTENT_SETTING_ASK, CONTENT_SETTING_BLOCK), | 323 ValidSettings(CONTENT_SETTING_ASK, CONTENT_SETTING_BLOCK), |
324 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE, | 324 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE, |
325 WebsiteSettingsRegistry::DESKTOP | | 325 WebsiteSettingsRegistry::DESKTOP | |
326 WebsiteSettingsRegistry::PLATFORM_ANDROID, | 326 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
327 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 327 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
| 328 |
| 329 Register(CONTENT_SETTINGS_TYPE_MEDIASTREAM_SCREEN, "media-stream-screen", |
| 330 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
| 331 WhitelistedSchemes(), ValidSettings(), |
| 332 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 333 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
| 334 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
328 } | 335 } |
329 | 336 |
330 void ContentSettingsRegistry::Register( | 337 void ContentSettingsRegistry::Register( |
331 ContentSettingsType type, | 338 ContentSettingsType type, |
332 const std::string& name, | 339 const std::string& name, |
333 ContentSetting initial_default_value, | 340 ContentSetting initial_default_value, |
334 WebsiteSettingsInfo::SyncStatus sync_status, | 341 WebsiteSettingsInfo::SyncStatus sync_status, |
335 const std::vector<std::string>& whitelisted_schemes, | 342 const std::vector<std::string>& whitelisted_schemes, |
336 const std::set<ContentSetting>& valid_settings, | 343 const std::set<ContentSetting>& valid_settings, |
337 WebsiteSettingsInfo::ScopingType scoping_type, | 344 WebsiteSettingsInfo::ScopingType scoping_type, |
(...skipping 19 matching lines...) Expand all Loading... |
357 if (!website_settings_info) | 364 if (!website_settings_info) |
358 return; | 365 return; |
359 | 366 |
360 DCHECK(!ContainsKey(content_settings_info_, type)); | 367 DCHECK(!ContainsKey(content_settings_info_, type)); |
361 content_settings_info_[type] = base::WrapUnique( | 368 content_settings_info_[type] = base::WrapUnique( |
362 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, | 369 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, |
363 valid_settings, incognito_behavior)); | 370 valid_settings, incognito_behavior)); |
364 } | 371 } |
365 | 372 |
366 } // namespace content_settings | 373 } // namespace content_settings |
OLD | NEW |