| 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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/task/cancelable_task_tracker.h" | |
| 11 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 12 #include "chrome/browser/common/cancelable_request.h" | 11 #include "chrome/browser/common/cancelable_request.h" |
| 13 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 14 #include "chrome/browser/history/history_service.h" | 13 #include "chrome/browser/history/history_service.h" |
| 15 #include "chrome/common/content_settings.h" | 14 #include "chrome/common/content_settings.h" |
| 16 #include "chrome/common/content_settings_types.h" | 15 #include "chrome/common/content_settings_types.h" |
| 17 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" | 16 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 19 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| 20 | 19 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 const content::SSLStatus& ssl, | 78 const content::SSLStatus& ssl, |
| 80 content::CertStore* cert_store); | 79 content::CertStore* cert_store); |
| 81 virtual ~WebsiteSettings(); | 80 virtual ~WebsiteSettings(); |
| 82 | 81 |
| 83 // This method is called when ever a permission setting is changed. | 82 // This method is called when ever a permission setting is changed. |
| 84 void OnSitePermissionChanged(ContentSettingsType type, | 83 void OnSitePermissionChanged(ContentSettingsType type, |
| 85 ContentSetting value); | 84 ContentSetting value); |
| 86 | 85 |
| 87 // Callback used for requests to fetch the number of page visits from history | 86 // Callback used for requests to fetch the number of page visits from history |
| 88 // service and the time of the first visit. | 87 // service and the time of the first visit. |
| 89 void OnGotVisitCountToHost(bool found_visits, | 88 void OnGotVisitCountToHost(HistoryService::Handle handle, |
| 89 bool found_visits, |
| 90 int visit_count, | 90 int visit_count, |
| 91 base::Time first_visit); | 91 base::Time first_visit); |
| 92 | 92 |
| 93 // This method is called by the UI when the UI is closing. | 93 // This method is called by the UI when the UI is closing. |
| 94 void OnUIClosing(); | 94 void OnUIClosing(); |
| 95 | 95 |
| 96 // Accessors. | 96 // Accessors. |
| 97 SiteConnectionStatus site_connection_status() const { | 97 SiteConnectionStatus site_connection_status() const { |
| 98 return site_connection_status_; | 98 return site_connection_status_; |
| 99 } | 99 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 base::string16 organization_name_; | 192 base::string16 organization_name_; |
| 193 | 193 |
| 194 // The |CertStore| provides all X509Certificates. | 194 // The |CertStore| provides all X509Certificates. |
| 195 content::CertStore* cert_store_; | 195 content::CertStore* cert_store_; |
| 196 | 196 |
| 197 // The |HostContentSettingsMap| is the service that provides and manages | 197 // The |HostContentSettingsMap| is the service that provides and manages |
| 198 // content settings (aka. site permissions). | 198 // content settings (aka. site permissions). |
| 199 HostContentSettingsMap* content_settings_; | 199 HostContentSettingsMap* content_settings_; |
| 200 | 200 |
| 201 // Used to request the number of page visits. | 201 // Used to request the number of page visits. |
| 202 base::CancelableTaskTracker visit_count_task_tracker_; | 202 CancelableRequestConsumer visit_count_request_consumer_; |
| 203 | 203 |
| 204 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); | 204 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ | 207 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_ |
| OLD | NEW |