OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ | 5 #ifndef IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ |
6 #define IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ | 6 #define IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ |
7 | 7 |
8 #import "ios/web/public/web_state/web_state_user_data.h" | 8 #import "ios/web/public/web_state/web_state_user_data.h" |
9 | 9 |
10 namespace captive_portal { | 10 namespace captive_portal { |
11 class CaptivePortalDetector; | 11 class CaptivePortalDetector; |
12 } | 12 } |
13 | 13 |
14 namespace web { | 14 namespace web { |
15 class WebState; | 15 class WebState; |
16 } | 16 } |
17 | 17 |
18 // Associates a Tab to a CaptivePortalDetector and manages its lifetime. | 18 // Associates a Tab to a CaptivePortalDetector and manages its lifetime. |
19 class CaptivePortalDetectorTabHelper | 19 class CaptivePortalDetectorTabHelper |
20 : public web::WebStateUserData<CaptivePortalDetectorTabHelper> { | 20 : public web::WebStateUserData<CaptivePortalDetectorTabHelper> { |
21 public: | 21 public: |
| 22 ~CaptivePortalDetectorTabHelper() override; |
| 23 |
22 explicit CaptivePortalDetectorTabHelper(web::WebState* web_state); | 24 explicit CaptivePortalDetectorTabHelper(web::WebState* web_state); |
23 | 25 |
24 captive_portal::CaptivePortalDetector* detector(); | 26 captive_portal::CaptivePortalDetector* detector(); |
25 | 27 |
26 private: | 28 private: |
27 ~CaptivePortalDetectorTabHelper() override; | |
28 | |
29 // The underlying CaptivePortalDetector. | 29 // The underlying CaptivePortalDetector. |
30 std::unique_ptr<captive_portal::CaptivePortalDetector> detector_; | 30 std::unique_ptr<captive_portal::CaptivePortalDetector> detector_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetectorTabHelper); | 32 DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetectorTabHelper); |
33 }; | 33 }; |
34 | 34 |
35 #endif // IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ | 35 #endif // IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ |
OLD | NEW |