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 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ |
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // value (see the ContentSetting enum). | 57 // value (see the ContentSetting enum). |
58 void Register(ContentSettingsType type, | 58 void Register(ContentSettingsType type, |
59 const std::string& name, | 59 const std::string& name, |
60 ContentSetting initial_default_value, | 60 ContentSetting initial_default_value, |
61 WebsiteSettingsInfo::SyncStatus sync_status, | 61 WebsiteSettingsInfo::SyncStatus sync_status, |
62 const std::vector<std::string>& whitelisted_schemes, | 62 const std::vector<std::string>& whitelisted_schemes, |
63 const std::set<ContentSetting>& valid_settings, | 63 const std::set<ContentSetting>& valid_settings, |
64 WebsiteSettingsInfo::ScopingType scoping_type, | 64 WebsiteSettingsInfo::ScopingType scoping_type, |
65 ContentSettingsInfo::IncognitoBehavior incognito_behavior); | 65 ContentSettingsInfo::IncognitoBehavior incognito_behavior); |
66 | 66 |
| 67 // Register a content setting that is only used on desktop platforms. It won't |
| 68 // be registered on other platforms meaning that type information won't be |
| 69 // available, a pref won't be registered, etc. |
| 70 void RegisterDesktop( |
| 71 ContentSettingsType type, |
| 72 const std::string& name, |
| 73 ContentSetting initial_default_value, |
| 74 WebsiteSettingsInfo::SyncStatus sync_status, |
| 75 const std::vector<std::string>& whitelisted_schemes, |
| 76 const std::set<ContentSetting>& valid_settings, |
| 77 WebsiteSettingsInfo::ScopingType scoping_type, |
| 78 ContentSettingsInfo::IncognitoBehavior incognito_behavior); |
| 79 |
67 Map content_settings_info_; | 80 Map content_settings_info_; |
68 WebsiteSettingsRegistry* website_settings_registry_; | 81 WebsiteSettingsRegistry* website_settings_registry_; |
69 | 82 |
70 DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry); | 83 DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry); |
71 }; | 84 }; |
72 | 85 |
73 } // namespace content_settings | 86 } // namespace content_settings |
74 | 87 |
75 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ | 88 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ |
OLD | NEW |