Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/browser/ssl/captive_portal_blocking_page.h

Issue 318213002: Add custom interstitial for captive portals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android builds Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ssl/DEPS ('k') | chrome/browser/ssl/captive_portal_blocking_page.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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/callback.h"
11 #include "base/macros.h"
12 #include "chrome/browser/interstitials/security_interstitial_page.h"
13
14 class GURL;
15
16 namespace content{
17 class WebContents;
18 }
19
20 // This class is responsible for showing/hiding the interstitial page that is
21 // shown when a captive portal triggers an SSL error.
22 // It deletes itself when the interstitial page is closed.
23 //
24 // This class should only be used on the UI thread because its implementation
25 // uses captive_portal::CaptivePortalService, which can only be accessed on the
26 // UI thread. Only used when ENABLE_CAPTIVE_PORTAL_DETECTION is true.
27 class CaptivePortalBlockingPage : public SecurityInterstitialPage {
28 public:
29 // Interstitial type, for testing.
30 static const void* kTypeForTesting;
31
32 CaptivePortalBlockingPage(content::WebContents* web_contents,
33 const GURL& request_url,
34 const base::Callback<void(bool)>& callback);
35 ~CaptivePortalBlockingPage() override;
36
37 // SecurityInterstitialPage method:
38 const void* GetTypeForTesting() const override;
39
40 protected:
41 // SecurityInterstitialPage methods:
42 void PopulateInterstitialStrings(
43 base::DictionaryValue* load_time_data) override;
44 bool ShouldCreateNewNavigation() const override;
45
46 // InterstitialPageDelegate method:
47 void CommandReceived(const std::string& command) override;
48
49 private:
50 base::Callback<void(bool)> callback_;
51
52 DISALLOW_COPY_AND_ASSIGN(CaptivePortalBlockingPage);
53 };
54
55 #endif // CHROME_BROWSER_SSL_CAPTIVE_PORTAL_BLOCKING_PAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/DEPS ('k') | chrome/browser/ssl/captive_portal_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698