| 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" |
| 11 #include "chrome/browser/ssl/security_state_model.h" | |
| 12 #include "components/content_settings/core/common/content_settings.h" | 11 #include "components/content_settings/core/common/content_settings.h" |
| 13 #include "components/content_settings/core/common/content_settings_types.h" | 12 #include "components/content_settings/core/common/content_settings_types.h" |
| 13 #include "components/security_state/security_state_model.h" |
| 14 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" | 14 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" |
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 class CertStore; | 18 class CertStore; |
| 19 class WebContents; | 19 class WebContents; |
| 20 } | 20 } |
| 21 | 21 |
| 22 class ChromeSSLHostStateDelegate; | 22 class ChromeSSLHostStateDelegate; |
| 23 class HostContentSettingsMap; | 23 class HostContentSettingsMap; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // WEBSITE_SETTINGS_TRANSPARENCY_VIEWER_OPENED = 7, | 89 // WEBSITE_SETTINGS_TRANSPARENCY_VIEWER_OPENED = 7, |
| 90 WEBSITE_SETTINGS_CONNECTION_HELP_OPENED = 8, | 90 WEBSITE_SETTINGS_CONNECTION_HELP_OPENED = 8, |
| 91 WEBSITE_SETTINGS_SITE_SETTINGS_OPENED = 9, | 91 WEBSITE_SETTINGS_SITE_SETTINGS_OPENED = 9, |
| 92 WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED = 10, | 92 WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED = 10, |
| 93 WEBSITE_SETTINGS_COUNT | 93 WEBSITE_SETTINGS_COUNT |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status | 96 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status |
| 97 // object to determine the status of the site's connection. The | 97 // object to determine the status of the site's connection. The |
| 98 // |WebsiteSettings| takes ownership of the |ui|. | 98 // |WebsiteSettings| takes ownership of the |ui|. |
| 99 WebsiteSettings(WebsiteSettingsUI* ui, | 99 WebsiteSettings( |
| 100 Profile* profile, | 100 WebsiteSettingsUI* ui, |
| 101 TabSpecificContentSettings* tab_specific_content_settings, | 101 Profile* profile, |
| 102 content::WebContents* web_contents, | 102 TabSpecificContentSettings* tab_specific_content_settings, |
| 103 const GURL& url, | 103 content::WebContents* web_contents, |
| 104 const SecurityStateModel::SecurityInfo& security_info, | 104 const GURL& url, |
| 105 content::CertStore* cert_store); | 105 const security_state::SecurityStateModel::SecurityInfo& security_info, |
| 106 content::CertStore* cert_store); |
| 106 ~WebsiteSettings() override; | 107 ~WebsiteSettings() override; |
| 107 | 108 |
| 108 void RecordWebsiteSettingsAction(WebsiteSettingsAction action); | 109 void RecordWebsiteSettingsAction(WebsiteSettingsAction action); |
| 109 | 110 |
| 110 // This method is called when ever a permission setting is changed. | 111 // This method is called when ever a permission setting is changed. |
| 111 void OnSitePermissionChanged(ContentSettingsType type, | 112 void OnSitePermissionChanged(ContentSettingsType type, |
| 112 ContentSetting value); | 113 ContentSetting value); |
| 113 | 114 |
| 114 // This method is called by the UI when the UI is closing. | 115 // This method is called by the UI when the UI is closing. |
| 115 void OnUIClosing(); | 116 void OnUIClosing(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 138 | 139 |
| 139 base::string16 organization_name() const { | 140 base::string16 organization_name() const { |
| 140 return organization_name_; | 141 return organization_name_; |
| 141 } | 142 } |
| 142 | 143 |
| 143 // SiteDataObserver implementation. | 144 // SiteDataObserver implementation. |
| 144 void OnSiteDataAccessed() override; | 145 void OnSiteDataAccessed() override; |
| 145 | 146 |
| 146 private: | 147 private: |
| 147 // Initializes the |WebsiteSettings|. | 148 // Initializes the |WebsiteSettings|. |
| 148 void Init(const GURL& url, | 149 void Init( |
| 149 const SecurityStateModel::SecurityInfo& security_info); | 150 const GURL& url, |
| 151 const security_state::SecurityStateModel::SecurityInfo& security_info); |
| 150 | 152 |
| 151 // Sets (presents) the information about the site's permissions in the |ui_|. | 153 // Sets (presents) the information about the site's permissions in the |ui_|. |
| 152 void PresentSitePermissions(); | 154 void PresentSitePermissions(); |
| 153 | 155 |
| 154 // Sets (presents) the information about the site's data in the |ui_|. | 156 // Sets (presents) the information about the site's data in the |ui_|. |
| 155 void PresentSiteData(); | 157 void PresentSiteData(); |
| 156 | 158 |
| 157 // Sets (presents) the information about the site's identity and connection | 159 // Sets (presents) the information about the site's identity and connection |
| 158 // in the |ui_|. | 160 // in the |ui_|. |
| 159 void PresentSiteIdentity(); | 161 void PresentSiteIdentity(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_; | 232 ChromeSSLHostStateDelegate* chrome_ssl_host_state_delegate_; |
| 231 | 233 |
| 232 bool did_revoke_user_ssl_decisions_; | 234 bool did_revoke_user_ssl_decisions_; |
| 233 | 235 |
| 234 Profile* profile_; | 236 Profile* profile_; |
| 235 | 237 |
| 236 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); | 238 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); |
| 237 }; | 239 }; |
| 238 | 240 |
| 239 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ | 241 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ |
| OLD | NEW |