| 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" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "content/public/browser/interstitial_page_delegate.h" | 12 #include "content/public/browser/interstitial_page_delegate.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class DictionaryValue; | 16 class DictionaryValue; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class InterstitialPage; | 20 class InterstitialPage; |
| 21 class WebContents; | 21 class WebContents; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace security_interstitials { | 24 namespace security_interstitials { |
| 25 class MetricsHelper; | 25 class MetricsHelper; |
| 26 class SecurityInterstitialControllerClient; | 26 class SecurityInterstitialControllerClient; |
| 27 | 27 |
| 28 class SecurityInterstitialPage : public content::InterstitialPageDelegate { | 28 class SecurityInterstitialPage : public content::InterstitialPageDelegate { |
| 29 public: | 29 public: |
| 30 // |request_url| is the URL which triggered the interstitial page. For |
| 31 // SafeBrowsing interstitials, it can be a main frame or a subresource URL. |
| 32 // For SSL interstitials, it's always the main frame URL. |
| 30 SecurityInterstitialPage( | 33 SecurityInterstitialPage( |
| 31 content::WebContents* web_contents, | 34 content::WebContents* web_contents, |
| 32 const GURL& url, | 35 const GURL& request_url, |
| 33 std::unique_ptr<SecurityInterstitialControllerClient> controller); | 36 std::unique_ptr<SecurityInterstitialControllerClient> controller); |
| 34 ~SecurityInterstitialPage() override; | 37 ~SecurityInterstitialPage() override; |
| 35 | 38 |
| 36 // Creates an interstitial and shows it. | 39 // Creates an interstitial and shows it. |
| 37 virtual void Show(); | 40 virtual void Show(); |
| 38 | 41 |
| 39 // Prevents creating the actual interstitial view for testing. | 42 // Prevents creating the actual interstitial view for testing. |
| 40 void DontCreateViewForTesting(); | 43 void DontCreateViewForTesting(); |
| 41 | 44 |
| 42 protected: | 45 protected: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 std::unique_ptr<SecurityInterstitialControllerClient> controller_; | 86 std::unique_ptr<SecurityInterstitialControllerClient> controller_; |
| 84 | 87 |
| 85 std::unique_ptr<MetricsHelper> metrics_helper_; | 88 std::unique_ptr<MetricsHelper> metrics_helper_; |
| 86 | 89 |
| 87 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); | 90 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); |
| 88 }; | 91 }; |
| 89 | 92 |
| 90 } // security_interstitials | 93 } // security_interstitials |
| 91 | 94 |
| 92 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_
H_ | 95 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_
H_ |
| OLD | NEW |