OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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 #include "content/public/browser/interstitial_page_delegate.h" |
| 10 #include "url/gurl.h" |
| 11 |
| 12 namespace content{ |
| 13 class InterstitialPage; |
| 14 class WebContents; |
| 15 } |
| 16 |
| 17 // This class is responsible for showing/hiding the interstitial page that is |
| 18 // shown when a captive portal and an SSL error is detected. |
| 19 // It deletes itself when the interstitial page is closed.. |
| 20 // |
| 21 // This class should only be used on the UI thread because its implementation |
| 22 // uses captive_portal::CaptivePortalService which can only be accessed on the |
| 23 // UI thread. |
| 24 class CaptivePortalBlockingPage : public content::InterstitialPageDelegate { |
| 25 public: |
| 26 CaptivePortalBlockingPage(content::WebContents* web_contents, |
| 27 const GURL& request_url); |
| 28 virtual ~CaptivePortalBlockingPage(); |
| 29 |
| 30 protected: |
| 31 // InterstitialPageDelegate implementation. |
| 32 virtual std::string GetHTMLContents() OVERRIDE; |
| 33 virtual void CommandReceived(const std::string& command) OVERRIDE; |
| 34 |
| 35 private: |
| 36 content::WebContents* web_contents_; |
| 37 // The URL which had the SSL error. |
| 38 GURL request_url_; |
| 39 // The interstitial page owns us. |
| 40 content::InterstitialPage* interstitial_page_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(CaptivePortalBlockingPage); |
| 43 }; |
| 44 |
| 45 #endif // CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_ |
OLD | NEW |