| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_H_ | 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_H_ |
| 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_H_ | 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // InterstitialPageDelegate method: | 57 // InterstitialPageDelegate method: |
| 58 std::string GetHTMLContents() override; | 58 std::string GetHTMLContents() override; |
| 59 | 59 |
| 60 // Returns the formatted host name for the request url. | 60 // Returns the formatted host name for the request url. |
| 61 base::string16 GetFormattedHostName() const; | 61 base::string16 GetFormattedHostName() const; |
| 62 | 62 |
| 63 content::InterstitialPage* interstitial_page() const; | 63 content::InterstitialPage* interstitial_page() const; |
| 64 content::WebContents* web_contents() const; | 64 content::WebContents* web_contents() const; |
| 65 GURL request_url() const; | 65 GURL request_url() const; |
| 66 | 66 |
| 67 // Returns the boolean value of the given |pref|. | |
| 68 bool IsPrefEnabled(const char* pref); | |
| 69 | |
| 70 SecurityInterstitialControllerClient* controller(); | 67 SecurityInterstitialControllerClient* controller(); |
| 71 | 68 |
| 72 MetricsHelper* metrics_helper(); | 69 MetricsHelper* metrics_helper(); |
| 73 | 70 |
| 74 private: | 71 private: |
| 75 // The WebContents with which this interstitial page is | 72 // The WebContents with which this interstitial page is |
| 76 // associated. Not available in ~SecurityInterstitialPage, since it | 73 // associated. Not available in ~SecurityInterstitialPage, since it |
| 77 // can be destroyed before this class is destroyed. | 74 // can be destroyed before this class is destroyed. |
| 78 content::WebContents* web_contents_; | 75 content::WebContents* web_contents_; |
| 79 const GURL request_url_; | 76 const GURL request_url_; |
| 80 // Once shown, |interstitial_page| takes ownership of this | 77 // Once shown, |interstitial_page| takes ownership of this |
| 81 // SecurityInterstitialPage instance. | 78 // SecurityInterstitialPage instance. |
| 82 content::InterstitialPage* interstitial_page_; | 79 content::InterstitialPage* interstitial_page_; |
| 83 // Whether the interstitial should create a view. | 80 // Whether the interstitial should create a view. |
| 84 bool create_view_; | 81 bool create_view_; |
| 85 // For subclasses that don't have their own ControllerClients yet. | 82 // For subclasses that don't have their own ControllerClients yet. |
| 86 std::unique_ptr<SecurityInterstitialControllerClient> controller_; | 83 std::unique_ptr<SecurityInterstitialControllerClient> controller_; |
| 87 | 84 |
| 88 std::unique_ptr<MetricsHelper> metrics_helper_; | 85 std::unique_ptr<MetricsHelper> metrics_helper_; |
| 89 | 86 |
| 90 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); | 87 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); |
| 91 }; | 88 }; |
| 92 | 89 |
| 93 } // security_interstitials | 90 } // security_interstitials |
| 94 | 91 |
| 95 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_
H_ | 92 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_
H_ |
| OLD | NEW |