| 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_HELPER_H_ | 5 #ifndef CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 // A "Login Tab" is a tab that was originally at a captive portal login | 98 // A "Login Tab" is a tab that was originally at a captive portal login |
| 99 // page. This is set to false when a captive portal is no longer detected. | 99 // page. This is set to false when a captive portal is no longer detected. |
| 100 bool IsLoginTab() const; | 100 bool IsLoginTab() const; |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 friend class CaptivePortalBrowserTest; | 103 friend class CaptivePortalBrowserTest; |
| 104 friend class CaptivePortalTabHelperTest; | 104 friend class CaptivePortalTabHelperTest; |
| 105 | 105 |
| 106 friend class WebContentsUserData<CaptivePortalTabHelper>; | 106 friend class WebContentsUserData<CaptivePortalTabHelper>; |
| 107 static int kUserDataKey; | |
| 108 explicit CaptivePortalTabHelper(content::WebContents* web_contents); | 107 explicit CaptivePortalTabHelper(content::WebContents* web_contents); |
| 109 | 108 |
| 110 // Called by Observe in response to the corresponding event. | 109 // Called by Observe in response to the corresponding event. |
| 111 void OnRedirect(int child_id, | 110 void OnRedirect(int child_id, |
| 112 ResourceType::Type resource_type, | 111 ResourceType::Type resource_type, |
| 113 const GURL& new_url); | 112 const GURL& new_url); |
| 114 | 113 |
| 115 // Called by Observe in response to the corresponding event. | 114 // Called by Observe in response to the corresponding event. |
| 116 void OnCaptivePortalResults(Result previous_result, Result result); | 115 void OnCaptivePortalResults(Result previous_result, Result result); |
| 117 | 116 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 content::RenderViewHost* provisional_render_view_host_; | 150 content::RenderViewHost* provisional_render_view_host_; |
| 152 | 151 |
| 153 content::NotificationRegistrar registrar_; | 152 content::NotificationRegistrar registrar_; |
| 154 | 153 |
| 155 DISALLOW_COPY_AND_ASSIGN(CaptivePortalTabHelper); | 154 DISALLOW_COPY_AND_ASSIGN(CaptivePortalTabHelper); |
| 156 }; | 155 }; |
| 157 | 156 |
| 158 } // namespace captive_portal | 157 } // namespace captive_portal |
| 159 | 158 |
| 160 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_HELPER_H_ | 159 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_TAB_HELPER_H_ |
| OLD | NEW |