Chromium Code Reviews| 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_WEBSITE_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_WEBSITE_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_WEBSITE_SETTINGS_H_ | 6 #define CHROME_BROWSER_WEBSITE_SETTINGS_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "chrome/browser/cancelable_request.h" | 11 #include "chrome/browser/cancelable_request.h" |
| 12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 13 #include "chrome/browser/history/history.h" | 13 #include "chrome/browser/history/history.h" |
| 14 #include "chrome/common/content_settings.h" | 14 #include "chrome/common/content_settings.h" |
| 15 #include "chrome/common/content_settings_types.h" | 15 #include "chrome/common/content_settings_types.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 18 #if defined(TOOLKIT_VIEWS) | |
| 19 #include "ui/views/view.h" | |
| 20 #endif | |
| 18 | 21 |
| 19 namespace content { | 22 namespace content { |
| 20 class CertStore; | 23 class CertStore; |
| 21 struct SSLStatus; | 24 struct SSLStatus; |
| 22 } | 25 } |
| 23 | 26 |
| 24 class HostContentSettingsMap; | 27 class HostContentSettingsMap; |
| 25 class Profile; | 28 class Profile; |
| 26 class TabContentsWrapper; | 29 class TabContentsWrapper; |
| 27 class WebsiteSettingsUI; | 30 class WebsiteSettingsUI; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 // The site is a trusted internal chrome page. | 67 // The site is a trusted internal chrome page. |
| 65 SITE_IDENTITY_STATUS_INTERNAL_PAGE, | 68 SITE_IDENTITY_STATUS_INTERNAL_PAGE, |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 // Creates a |WebsiteSettingsModel| incl. a |WebsiteSettingsUI| and displays | 71 // Creates a |WebsiteSettingsModel| incl. a |WebsiteSettingsUI| and displays |
| 69 // the UI. The |url| contains the omnibox URL of the currently active tab, | 72 // the UI. The |url| contains the omnibox URL of the currently active tab, |
| 70 // |parent| contains the currently active window, |profile| contains the | 73 // |parent| contains the currently active window, |profile| contains the |
| 71 // currently active profile and |ssl| contains the |SSLStatus| of the | 74 // currently active profile and |ssl| contains the |SSLStatus| of the |
| 72 // connection to the website in the currently active tab that is wrapped by | 75 // connection to the website in the currently active tab that is wrapped by |
| 73 // the |tab_contents_wrapper|. | 76 // the |tab_contents_wrapper|. |
| 77 #if defined(TOOLKIT_VIEWS) | |
| 78 static void Show(views::View* anchor_view, | |
|
Ben Goodger (Google)
2012/05/29 19:54:20
think about how to make Show() work in a cross pla
markusheintz_
2012/06/05 17:02:12
After a small refactoring: http://codereview.chrom
| |
| 79 Profile* profile, | |
| 80 TabContentsWrapper* tab_contents_wrapper, | |
| 81 const GURL& url, | |
| 82 const content::SSLStatus& ssl); | |
| 83 #elif defined(TOOLKIT_GTK) | |
| 74 static void Show(gfx::NativeWindow parent, | 84 static void Show(gfx::NativeWindow parent, |
| 75 Profile* profile, | 85 Profile* profile, |
| 76 TabContentsWrapper* tab_contents_wrapper, | 86 TabContentsWrapper* tab_contents_wrapper, |
| 77 const GURL& url, | 87 const GURL& url, |
| 78 const content::SSLStatus& ssl); | 88 const content::SSLStatus& ssl); |
| 89 #endif | |
| 90 | |
| 79 | 91 |
| 80 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status | 92 // Creates a WebsiteSettings for the passed |url| using the given |ssl| status |
| 81 // object to determine the status of the site's connection. The | 93 // object to determine the status of the site's connection. The |
| 82 // |WebsiteSettings| takes ownership of the |ui|. | 94 // |WebsiteSettings| takes ownership of the |ui|. |
| 83 WebsiteSettings(WebsiteSettingsUI* ui, | 95 WebsiteSettings(WebsiteSettingsUI* ui, |
| 84 Profile* profile, | 96 Profile* profile, |
| 85 TabSpecificContentSettings* tab_specific_content_settings, | 97 TabSpecificContentSettings* tab_specific_content_settings, |
| 86 const GURL& url, | 98 const GURL& url, |
| 87 const content::SSLStatus& ssl, | 99 const content::SSLStatus& ssl, |
| 88 content::CertStore* cert_store); | 100 content::CertStore* cert_store); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 // content settings (aka. site permissions). | 210 // content settings (aka. site permissions). |
| 199 HostContentSettingsMap* content_settings_; | 211 HostContentSettingsMap* content_settings_; |
| 200 | 212 |
| 201 // Used to request the number of page visits. | 213 // Used to request the number of page visits. |
| 202 CancelableRequestConsumer visit_count_request_consumer_; | 214 CancelableRequestConsumer visit_count_request_consumer_; |
| 203 | 215 |
| 204 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); | 216 DISALLOW_COPY_AND_ASSIGN(WebsiteSettings); |
| 205 }; | 217 }; |
| 206 | 218 |
| 207 #endif // CHROME_BROWSER_WEBSITE_SETTINGS_H_ | 219 #endif // CHROME_BROWSER_WEBSITE_SETTINGS_H_ |
| OLD | NEW |