OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ | |
6 #define CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/macros.h" | |
11 #include "chrome/browser/interstitials/security_interstitial_page.h" | |
12 | |
13 class GURL; | |
14 | |
15 // This class is responsible for showing/hiding the interstitial page that is | |
16 // shown when a captive portal and an SSL error is detected. | |
17 // It deletes itself when the interstitial page is closed. | |
18 // | |
19 // This class should only be used on the UI thread because its implementation | |
20 // uses captive_portal::CaptivePortalService, which can only be accessed on the | |
21 // UI thread. | |
22 class CaptivePortalBlockingPage : public SecurityInterstitialPage { | |
23 public: | |
24 // Interstitial type, for testing. | |
25 static const void* kTypeForTesting; | |
26 | |
27 CaptivePortalBlockingPage(content::WebContents* web_contents, | |
mmenke
2014/11/26 18:57:48
Should forward declare WebContents
meacer
2014/12/08 22:29:50
Done.
| |
28 const GURL& request_url); | |
29 ~CaptivePortalBlockingPage() override; | |
30 | |
31 // SecurityInterstitialPage method: | |
32 const void* GetTypeForTesting() const override; | |
33 | |
34 protected: | |
35 // SecurityInterstitialPage implementation: | |
36 void PopulateInterstitialStrings( | |
37 base::DictionaryValue* load_time_data) override; | |
38 bool ShouldCreateNewNavigation() const override; | |
39 | |
40 // InterstitialPageDelegate implementation. | |
41 void CommandReceived(const std::string& command) override; | |
42 | |
43 private: | |
44 DISALLOW_COPY_AND_ASSIGN(CaptivePortalBlockingPage); | |
45 }; | |
46 | |
47 #endif // CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ | |
OLD | NEW |