Chromium Code Reviews| 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| refers to the URL that triggers the interstitial page. it | |
| 31 // can be a main frame URL or subresource URL. | |
|
meacer
2017/01/11 01:33:31
The comment might not be accurate for non-SafeBrow
Jialiu Lin
2017/01/11 02:53:16
much better. Thanks!
(I think you meant "For SSL i
| |
| 30 SecurityInterstitialPage( | 32 SecurityInterstitialPage( |
| 31 content::WebContents* web_contents, | 33 content::WebContents* web_contents, |
| 32 const GURL& url, | 34 const GURL& request_url, |
| 33 std::unique_ptr<SecurityInterstitialControllerClient> controller); | 35 std::unique_ptr<SecurityInterstitialControllerClient> controller); |
| 34 ~SecurityInterstitialPage() override; | 36 ~SecurityInterstitialPage() override; |
| 35 | 37 |
| 36 // Creates an interstitial and shows it. | 38 // Creates an interstitial and shows it. |
| 37 virtual void Show(); | 39 virtual void Show(); |
| 38 | 40 |
| 39 // Prevents creating the actual interstitial view for testing. | 41 // Prevents creating the actual interstitial view for testing. |
| 40 void DontCreateViewForTesting(); | 42 void DontCreateViewForTesting(); |
| 41 | 43 |
| 42 protected: | 44 protected: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 std::unique_ptr<SecurityInterstitialControllerClient> controller_; | 85 std::unique_ptr<SecurityInterstitialControllerClient> controller_; |
| 84 | 86 |
| 85 std::unique_ptr<MetricsHelper> metrics_helper_; | 87 std::unique_ptr<MetricsHelper> metrics_helper_; |
| 86 | 88 |
| 87 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); | 89 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 } // security_interstitials | 92 } // security_interstitials |
| 91 | 93 |
| 92 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_ H_ | 94 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_ H_ |
| OLD | NEW |