Chromium Code Reviews| 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> | |
|
mmenke
2014/06/20 16:07:09
include macros.h for OVERRIDE and DISALLOW_COPY_AN
mmenke
2014/06/20 16:07:09
Blank line after C++ headers.
meacer
2014/06/20 23:28:14
Done.
| |
| 9 #include "content/public/browser/interstitial_page_delegate.h" | |
| 10 #include "url/gurl.h" | |
| 11 | |
| 12 namespace content{ | |
|
mmenke
2014/06/20 16:07:08
nit: Space before "{"
meacer
2014/06/20 23:28:14
Done.
| |
| 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. | |
|
mmenke
2014/06/20 16:07:08
More fundamentally, it's not safe to muck with a W
meacer
2014/06/20 23:28:15
Done.
| |
| 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 |