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

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2566493003: Remove CRWNetworkActivityIndicatorManager. (Closed)
Patch Set: Remove duplicate file refs. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/crw_pass_kit_downloader_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index c5a56e9e6f4f5fe587f072fceac3353107996e0e..edb31e30cba8e1eaa6d5146e66acfe4a1c1b5611 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -39,7 +39,6 @@
#include "components/url_formatter/url_formatter.h"
#import "ios/net/http_response_headers_util.h"
#import "ios/net/nsurlrequest_util.h"
-#import "ios/web/crw_network_activity_indicator_manager.h"
#import "ios/web/history_state_util.h"
#include "ios/web/interstitials/web_interstitial_impl.h"
#import "ios/web/navigation/crw_session_certificate_policy_manager.h"
@@ -490,8 +489,6 @@ NSError* WKWebViewErrorWithSource(NSError* error, WKWebViewErrorSource source) {
@property(nonatomic, readwrite) id<CRWNativeContent> nativeController;
// Returns NavigationManager's session controller.
@property(nonatomic, readonly) CRWSessionController* sessionController;
-// Activity indicator group ID for this web controller.
-@property(nonatomic, readonly) NSString* activityIndicatorGroupID;
// Dictionary where keys are the names of WKWebView properties and values are
// selector names which should be called when a corresponding property has
// changed. e.g. @{ @"URL" : @"webViewURLDidChange" } means that
@@ -542,10 +539,6 @@ NSError* WKWebViewErrorWithSource(NSError* error, WKWebViewErrorSource source) {
- (void)clearTransientContentView;
// Returns a lazily created CRWTouchTrackingRecognizer.
- (CRWTouchTrackingRecognizer*)touchTrackingRecognizer;
-// Adds an activity indicator tasks for this web controller.
-- (void)addActivityIndicatorTask;
-// Clears all activity indicator tasks for this web controller.
-- (void)clearActivityIndicatorTasks;
// Shows placeholder overlay.
- (void)addPlaceholderOverlay;
// Removes placeholder overlay.
@@ -1174,12 +1167,6 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
[self setNativeControllerWebUsageEnabled:_webUsageEnabled];
}
-- (NSString*)activityIndicatorGroupID {
- return [NSString
- stringWithFormat:@"WebController.NetworkActivityIndicatorKey.%@",
- self.webStateImpl->GetRequestGroupID()];
-}
-
- (NSDictionary*)WKWebViewObservers {
return @{
@"certificateChain" : @"webViewSecurityFeaturesDidChange",
@@ -3943,16 +3930,6 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
kMaximumDelayForUserInteractionInSeconds);
}
-- (void)addActivityIndicatorTask {
- [[CRWNetworkActivityIndicatorManager sharedInstance]
- startNetworkTaskForGroup:[self activityIndicatorGroupID]];
-}
-
-- (void)clearActivityIndicatorTasks {
- [[CRWNetworkActivityIndicatorManager sharedInstance]
- clearNetworkTasksForGroup:[self activityIndicatorGroupID]];
-}
-
#pragma mark Placeholder Overlay Methods
- (void)addPlaceholderOverlay {
@@ -4784,7 +4761,6 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
for (NSString* keyPath in self.WKWebViewObservers) {
[_webView removeObserver:self forKeyPath:keyPath];
}
- [self clearActivityIndicatorTasks];
_webView.reset([webView retain]);
@@ -5433,13 +5409,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
}
- (void)webViewLoadingStateDidChange {
- if ([_webView isLoading]) {
- [self addActivityIndicatorTask];
- return;
- }
-
- [self clearActivityIndicatorTasks];
- if (![self isCurrentNavigationBackForward]) {
+ if ([_webView isLoading] || ![self isCurrentNavigationBackForward]) {
return;
}
« no previous file with comments | « ios/web/web_state/crw_pass_kit_downloader_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698