OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_RELOADER_H_ | 5 #ifndef CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_RELOADER_H_ |
6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_RELOADER_H_ | 6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_RELOADER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 virtual void OnLoadCommitted(int net_error); | 99 virtual void OnLoadCommitted(int net_error); |
100 | 100 |
101 // This is called when the current provisional main frame load is canceled. | 101 // This is called when the current provisional main frame load is canceled. |
102 // Sets state to STATE_NONE, unless this is a login tab. | 102 // Sets state to STATE_NONE, unless this is a login tab. |
103 virtual void OnAbort(); | 103 virtual void OnAbort(); |
104 | 104 |
105 // Called whenever a provisional load to the main frame is redirected. | 105 // Called whenever a provisional load to the main frame is redirected. |
106 virtual void OnRedirect(bool is_ssl); | 106 virtual void OnRedirect(bool is_ssl); |
107 | 107 |
108 // Called whenever a captive portal test completes. | 108 // Called whenever a captive portal test completes. |
109 virtual void OnCaptivePortalResults(Result previous_result, Result result); | 109 virtual void OnCaptivePortalResults(CaptivePortalResult previous_result, |
| 110 CaptivePortalResult result); |
110 | 111 |
111 // Called on certificate errors, which often indicate a captive portal. | 112 // Called on certificate errors, which often indicate a captive portal. |
112 void OnSSLCertError(const net::SSLInfo& ssl_info); | 113 void OnSSLCertError(const net::SSLInfo& ssl_info); |
113 | 114 |
114 protected: | 115 protected: |
115 // The following functions are used only when testing: | 116 // The following functions are used only when testing: |
116 | 117 |
117 State state() const { return state_; } | 118 State state() const { return state_; } |
118 | 119 |
119 content::WebContents* web_contents() { return web_contents_; } | 120 content::WebContents* web_contents() { return web_contents_; } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 const OpenLoginTabCallback open_login_tab_callback_; | 180 const OpenLoginTabCallback open_login_tab_callback_; |
180 | 181 |
181 base::WeakPtrFactory<CaptivePortalTabReloader> weak_factory_; | 182 base::WeakPtrFactory<CaptivePortalTabReloader> weak_factory_; |
182 | 183 |
183 DISALLOW_COPY_AND_ASSIGN(CaptivePortalTabReloader); | 184 DISALLOW_COPY_AND_ASSIGN(CaptivePortalTabReloader); |
184 }; | 185 }; |
185 | 186 |
186 } // namespace captive_portal | 187 } // namespace captive_portal |
187 | 188 |
188 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_RELOADER_H_ | 189 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_RELOADER_H_ |
OLD | NEW |