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