OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WEB_NETWORK_ACTIVITY_INDICATOR_TAB_HELPER_H_ | 5 #ifndef IOS_CHROME_BROWSER_WEB_NETWORK_ACTIVITY_INDICATOR_TAB_HELPER_H_ |
6 #define IOS_CHROME_BROWSER_WEB_NETWORK_ACTIVITY_INDICATOR_TAB_HELPER_H_ | 6 #define IOS_CHROME_BROWSER_WEB_NETWORK_ACTIVITY_INDICATOR_TAB_HELPER_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 static void CreateForWebState(web::WebState* web_state, NSString* tab_id); | 23 static void CreateForWebState(web::WebState* web_state, NSString* tab_id); |
24 | 24 |
25 private: | 25 private: |
26 NetworkActivityIndicatorTabHelper(web::WebState* web_state, NSString* tab_id); | 26 NetworkActivityIndicatorTabHelper(web::WebState* web_state, NSString* tab_id); |
27 ~NetworkActivityIndicatorTabHelper() override; | 27 ~NetworkActivityIndicatorTabHelper() override; |
28 | 28 |
29 // web::WebStateObserver overrides: | 29 // web::WebStateObserver overrides: |
30 void DidStartLoading() override; | 30 void DidStartLoading() override; |
31 void DidStopLoading() override; | 31 void DidStopLoading() override; |
32 | 32 |
| 33 // Clears any network activity state associated with this activity. |
| 34 void Stop(); |
| 35 |
33 // Key used to uniquely identify this activity. | 36 // Key used to uniquely identify this activity. |
34 base::scoped_nsobject<NSString> network_activity_key_; | 37 base::scoped_nsobject<NSString> network_activity_key_; |
35 | 38 |
36 DISALLOW_COPY_AND_ASSIGN(NetworkActivityIndicatorTabHelper); | 39 DISALLOW_COPY_AND_ASSIGN(NetworkActivityIndicatorTabHelper); |
37 }; | 40 }; |
38 | 41 |
39 #endif // IOS_CHROME_BROWSER_WEB_NETWORK_ACTIVITY_INDICATOR_TAB_HELPER_H_ | 42 #endif // IOS_CHROME_BROWSER_WEB_NETWORK_ACTIVITY_INDICATOR_TAB_HELPER_H_ |
OLD | NEW |