| 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 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ | 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // WEBSITE_SETTINGS_CONNECTION_TAB_SELECTED = 2, | 94 // WEBSITE_SETTINGS_CONNECTION_TAB_SELECTED = 2, |
| 95 // WEBSITE_SETTINGS_CONNECTION_TAB_SHOWN_IMMEDIATELY = 3, | 95 // WEBSITE_SETTINGS_CONNECTION_TAB_SHOWN_IMMEDIATELY = 3, |
| 96 WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED = 4, | 96 WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED = 4, |
| 97 WEBSITE_SETTINGS_CHANGED_PERMISSION = 5, | 97 WEBSITE_SETTINGS_CHANGED_PERMISSION = 5, |
| 98 WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED = 6, | 98 WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED = 6, |
| 99 // No longer used; indicated a UI viewer for SCTs. | 99 // No longer used; indicated a UI viewer for SCTs. |
| 100 // WEBSITE_SETTINGS_TRANSPARENCY_VIEWER_OPENED = 7, | 100 // WEBSITE_SETTINGS_TRANSPARENCY_VIEWER_OPENED = 7, |
| 101 WEBSITE_SETTINGS_CONNECTION_HELP_OPENED = 8, | 101 WEBSITE_SETTINGS_CONNECTION_HELP_OPENED = 8, |
| 102 WEBSITE_SETTINGS_SITE_SETTINGS_OPENED = 9, | 102 WEBSITE_SETTINGS_SITE_SETTINGS_OPENED = 9, |
| 103 WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED = 10, | 103 WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED = 10, |
| 104 WEBSITE_SETTINGS_SHOW_ALL_PERMISSIONS_PRESSED = 11, |
| 104 WEBSITE_SETTINGS_COUNT | 105 WEBSITE_SETTINGS_COUNT |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 struct ChooserUIInfo { | 108 struct ChooserUIInfo { |
| 108 ContentSettingsType content_settings_type; | 109 ContentSettingsType content_settings_type; |
| 109 ChooserContextBase* (*get_context)(Profile*); | 110 ChooserContextBase* (*get_context)(Profile*); |
| 110 int blocked_icon_id; | 111 int blocked_icon_id; |
| 111 int allowed_icon_id; | 112 int allowed_icon_id; |
| 112 int label_string_id; | 113 int label_string_id; |
| 113 int delete_tooltip_string_id; | 114 int delete_tooltip_string_id; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 124 const GURL& url, | 125 const GURL& url, |
| 125 const security_state::SecurityInfo& security_info); | 126 const security_state::SecurityInfo& security_info); |
| 126 ~WebsiteSettings() override; | 127 ~WebsiteSettings() override; |
| 127 | 128 |
| 128 void RecordWebsiteSettingsAction(WebsiteSettingsAction action); | 129 void RecordWebsiteSettingsAction(WebsiteSettingsAction action); |
| 129 | 130 |
| 130 // This method is called when ever a permission setting is changed. | 131 // This method is called when ever a permission setting is changed. |
| 131 void OnSitePermissionChanged(ContentSettingsType type, | 132 void OnSitePermissionChanged(ContentSettingsType type, |
| 132 ContentSetting value); | 133 ContentSetting value); |
| 133 | 134 |
| 135 // Sets (presents) the information about the site's permissions in the |ui_|, |
| 136 // showing all permissions. |
| 137 void OnPresentAllSitePermissions(); |
| 138 |
| 134 // This method is called whenever access to an object is revoked. | 139 // This method is called whenever access to an object is revoked. |
| 135 void OnSiteChosenObjectDeleted(const ChooserUIInfo& ui_info, | 140 void OnSiteChosenObjectDeleted(const ChooserUIInfo& ui_info, |
| 136 const base::DictionaryValue& object); | 141 const base::DictionaryValue& object); |
| 137 | 142 |
| 138 // This method is called by the UI when the UI is closing. | 143 // This method is called by the UI when the UI is closing. |
| 139 void OnUIClosing(); | 144 void OnUIClosing(); |
| 140 | 145 |
| 141 // This method is called when the revoke SSL error bypass button is pressed. | 146 // This method is called when the revoke SSL error bypass button is pressed. |
| 142 void OnRevokeSSLErrorBypassButtonPressed(); | 147 void OnRevokeSSLErrorBypassButtonPressed(); |
| 143 | 148 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 172 // Sets (presents) the information about the site's identity and connection | 177 // Sets (presents) the information about the site's identity and connection |
| 173 // in the |ui_|. | 178 // in the |ui_|. |
| 174 void PresentSiteIdentity(); | 179 void PresentSiteIdentity(); |
| 175 | 180 |
| 176 // The website settings UI displays information and controls for site- | 181 // The website settings UI displays information and controls for site- |
| 177 // specific data (local stored objects like cookies), site-specific | 182 // specific data (local stored objects like cookies), site-specific |
| 178 // permissions (location, pop-up, plugin, etc. permissions) and site-specific | 183 // permissions (location, pop-up, plugin, etc. permissions) and site-specific |
| 179 // information (identity, connection status, etc.). | 184 // information (identity, connection status, etc.). |
| 180 WebsiteSettingsUI* ui_; | 185 WebsiteSettingsUI* ui_; |
| 181 | 186 |
| 187 // Whether to show all permissions. |
| 188 bool show_all_permissions_; |
| 189 |
| 182 // The flag that controls whether an infobar is displayed after the website | 190 // The flag that controls whether an infobar is displayed after the website |
| 183 // settings UI is closed or not. | 191 // settings UI is closed or not. |
| 184 bool show_info_bar_; | 192 bool show_info_bar_; |
| 185 | 193 |
| 186 // The Omnibox URL of the website for which to display site permissions and | 194 // The Omnibox URL of the website for which to display site permissions and |
| 187 // site information. | 195 // site information. |
| 188 GURL site_url_; | 196 GURL site_url_; |
| 189 | 197 |
| 190 // Status of the website's identity verification check. | 198 // Status of the website's identity verification check. |
| 191 SiteIdentityStatus site_identity_status_; | 199 SiteIdentityStatus site_identity_status_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 bool did_revoke_user_ssl_decisions_; | 243 bool did_revoke_user_ssl_decisions_; |
| 236 | 244 |
| 237 Profile* profile_; | 245 Profile* profile_; |
| 238 | 246 |
| 239 security_state::SecurityLevel security_level_; | 247 security_state::SecurityLevel security_level_; |
| 240 | 248 |
| 241 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); | 249 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); |
| 242 }; | 250 }; |
| 243 | 251 |
| 244 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ | 252 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ |
| OLD | NEW |