| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // If |filter| is not null then only exceptions with matching primary patterns | 73 // If |filter| is not null then only exceptions with matching primary patterns |
| 74 // will be returned. | 74 // will be returned. |
| 75 void GetExceptionsFromHostContentSettingsMap( | 75 void GetExceptionsFromHostContentSettingsMap( |
| 76 const HostContentSettingsMap* map, | 76 const HostContentSettingsMap* map, |
| 77 ContentSettingsType type, | 77 ContentSettingsType type, |
| 78 content::WebUI* web_ui, | 78 content::WebUI* web_ui, |
| 79 bool incognito, | 79 bool incognito, |
| 80 const std::string* filter, | 80 const std::string* filter, |
| 81 base::ListValue* exceptions); | 81 base::ListValue* exceptions); |
| 82 | 82 |
| 83 // Fills in object saying what the current settings is for the category (such as |
| 84 // enabled or blocked) and the source of that setting (such preference, policy, |
| 85 // or extension). |
| 86 void GetContentCategorySetting( |
| 87 const HostContentSettingsMap* map, |
| 88 ContentSettingsType content_type, |
| 89 base::DictionaryValue* object); |
| 90 |
| 83 // Returns exceptions constructed from the policy-set allowed URLs | 91 // Returns exceptions constructed from the policy-set allowed URLs |
| 84 // for the content settings |type| mic or camera. | 92 // for the content settings |type| mic or camera. |
| 85 void GetPolicyAllowedUrls( | 93 void GetPolicyAllowedUrls( |
| 86 ContentSettingsType type, | 94 ContentSettingsType type, |
| 87 std::vector<std::unique_ptr<base::DictionaryValue>>* exceptions, | 95 std::vector<std::unique_ptr<base::DictionaryValue>>* exceptions, |
| 88 content::WebUI* web_ui, | 96 content::WebUI* web_ui, |
| 89 bool incognito); | 97 bool incognito); |
| 90 | 98 |
| 91 // This struct facilitates lookup of a chooser context factory function by name | 99 // This struct facilitates lookup of a chooser context factory function by name |
| 92 // for a given content settings type and is declared early so that it can used | 100 // for a given content settings type and is declared early so that it can used |
| (...skipping 22 matching lines...) Expand all Loading... |
| 115 // Fills in |exceptions| with Values for the given |chooser_type| from map. | 123 // Fills in |exceptions| with Values for the given |chooser_type| from map. |
| 116 void GetChooserExceptionsFromProfile( | 124 void GetChooserExceptionsFromProfile( |
| 117 Profile* profile, | 125 Profile* profile, |
| 118 bool incognito, | 126 bool incognito, |
| 119 const ChooserTypeNameEntry& chooser_type, | 127 const ChooserTypeNameEntry& chooser_type, |
| 120 base::ListValue* exceptions); | 128 base::ListValue* exceptions); |
| 121 | 129 |
| 122 } // namespace site_settings | 130 } // namespace site_settings |
| 123 | 131 |
| 124 #endif // CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ | 132 #endif // CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ |
| OLD | NEW |