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 CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 5 #ifndef CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "content/public/browser/interstitial_page_delegate.h" | 9 #include "content/public/browser/interstitial_page_delegate.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 void DontCreateViewForTesting(); | 37 void DontCreateViewForTesting(); |
38 | 38 |
39 protected: | 39 protected: |
40 // Returns true if the interstitial should create a new navigation entry. | 40 // Returns true if the interstitial should create a new navigation entry. |
41 virtual bool ShouldCreateNewNavigation() const = 0; | 41 virtual bool ShouldCreateNewNavigation() const = 0; |
42 | 42 |
43 // Populates the strings used to generate the HTML from the template. | 43 // Populates the strings used to generate the HTML from the template. |
44 virtual void PopulateInterstitialStrings( | 44 virtual void PopulateInterstitialStrings( |
45 base::DictionaryValue* load_time_data) = 0; | 45 base::DictionaryValue* load_time_data) = 0; |
46 | 46 |
| 47 // Gives an opportunity for child classes to react to Show() having run. The |
| 48 // interstitial_page_ will now have a value. |
| 49 virtual void AfterShow() = 0; |
| 50 |
47 // InterstitialPageDelegate method: | 51 // InterstitialPageDelegate method: |
48 std::string GetHTMLContents() override; | 52 std::string GetHTMLContents() override; |
49 | 53 |
50 // Returns the formatted host name for the request url. | 54 // Returns the formatted host name for the request url. |
51 base::string16 GetFormattedHostName() const; | 55 base::string16 GetFormattedHostName() const; |
52 | 56 |
53 content::InterstitialPage* interstitial_page() const; | 57 content::InterstitialPage* interstitial_page() const; |
54 content::WebContents* web_contents() const; | 58 content::WebContents* web_contents() const; |
55 GURL request_url() const; | 59 GURL request_url() const; |
56 | 60 |
(...skipping 21 matching lines...) Expand all Loading... |
78 content::InterstitialPage* interstitial_page_; | 82 content::InterstitialPage* interstitial_page_; |
79 // Whether the interstitial should create a view. | 83 // Whether the interstitial should create a view. |
80 bool create_view_; | 84 bool create_view_; |
81 // For subclasses that don't have their own ChromeControllerClients yet. | 85 // For subclasses that don't have their own ChromeControllerClients yet. |
82 scoped_ptr<ChromeControllerClient> controller_; | 86 scoped_ptr<ChromeControllerClient> controller_; |
83 | 87 |
84 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); | 88 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); |
85 }; | 89 }; |
86 | 90 |
87 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 91 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
OLD | NEW |