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_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ | 5 #ifndef CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ |
6 #define CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ | 6 #define CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 const GURL& request_url, | 50 const GURL& request_url, |
51 const GURL& login_url, | 51 const GURL& login_url, |
52 scoped_ptr<SSLCertReporter> ssl_cert_reporter, | 52 scoped_ptr<SSLCertReporter> ssl_cert_reporter, |
53 const net::SSLInfo& ssl_info, | 53 const net::SSLInfo& ssl_info, |
54 const base::Callback<void(bool)>& callback); | 54 const base::Callback<void(bool)>& callback); |
55 ~CaptivePortalBlockingPage() override; | 55 ~CaptivePortalBlockingPage() override; |
56 | 56 |
57 // SecurityInterstitialPage method: | 57 // SecurityInterstitialPage method: |
58 const void* GetTypeForTesting() const override; | 58 const void* GetTypeForTesting() const override; |
59 | 59 |
60 void SetDelegateForTesting(Delegate* delegate) { delegate_.reset(delegate); } | 60 // Should only be used for testing and chrome://interstitials page. |
| 61 void SetDelegate(Delegate* delegate) { delegate_.reset(delegate); } |
61 | 62 |
62 protected: | 63 protected: |
63 // SecurityInterstitialPage methods: | 64 // SecurityInterstitialPage methods: |
64 void PopulateInterstitialStrings( | 65 void PopulateInterstitialStrings( |
65 base::DictionaryValue* load_time_data) override; | 66 base::DictionaryValue* load_time_data) override; |
66 bool ShouldCreateNewNavigation() const override; | 67 bool ShouldCreateNewNavigation() const override; |
67 | 68 |
68 // InterstitialPageDelegate method: | 69 // InterstitialPageDelegate method: |
69 void CommandReceived(const std::string& command) override; | 70 void CommandReceived(const std::string& command) override; |
70 void OnProceed() override; | 71 void OnProceed() override; |
71 void OnDontProceed() override; | 72 void OnDontProceed() override; |
72 | 73 |
73 private: | 74 private: |
74 // URL of the login page, opened when the user clicks the "Connect" button. | 75 // URL of the login page, opened when the user clicks the "Connect" button. |
75 GURL login_url_; | 76 GURL login_url_; |
76 scoped_ptr<Delegate> delegate_; | 77 scoped_ptr<Delegate> delegate_; |
77 scoped_ptr<CertReportHelper> cert_report_helper_; | 78 scoped_ptr<CertReportHelper> cert_report_helper_; |
78 base::Callback<void(bool)> callback_; | 79 base::Callback<void(bool)> callback_; |
79 | 80 |
80 DISALLOW_COPY_AND_ASSIGN(CaptivePortalBlockingPage); | 81 DISALLOW_COPY_AND_ASSIGN(CaptivePortalBlockingPage); |
81 }; | 82 }; |
82 | 83 |
83 #endif // CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ | 84 #endif // CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ |
OLD | NEW |