Commit 26141200 authored by Mark Cogan's avatar Mark Cogan Committed by Commit Bot

[iOS] Remove unusued method/params from BVC and TabModel

Change-Id: I5e204e091809a1640856aacfc3126cd63a40a75f
Reviewed-on: https://chromium-review.googlesource.com/c/1323074
Commit-Queue: Mark Cogan <marq@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606072}
parent 90e5db10
...@@ -153,9 +153,8 @@ NSUInteger const kTabPositionAutomatically = NSNotFound; ...@@ -153,9 +153,8 @@ NSUInteger const kTabPositionAutomatically = NSNotFound;
// Notifies observers that the given tab is loading a new URL. // Notifies observers that the given tab is loading a new URL.
- (void)notifyTabLoading:(Tab*)tab; - (void)notifyTabLoading:(Tab*)tab;
// Notifies observers that the given tab finished loading. |success| is YES if // Notifies observers that the given tab finished loading.
// the load was successful, NO otherwise. - (void)notifyTabFinishedLoading:(Tab*)tab;
- (void)notifyTabFinishedLoading:(Tab*)tab success:(BOOL)success;
// Notifies observers that the given tab will open. If it isn't the active tab, // Notifies observers that the given tab will open. If it isn't the active tab,
// |background| is YES, NO otherwise. // |background| is YES, NO otherwise.
......
...@@ -582,9 +582,9 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) { ...@@ -582,9 +582,9 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) {
[_observers tabModel:self didStartLoadingTab:tab]; [_observers tabModel:self didStartLoadingTab:tab];
} }
- (void)notifyTabFinishedLoading:(Tab*)tab success:(BOOL)success { - (void)notifyTabFinishedLoading:(Tab*)tab {
[self notifyTabChanged:tab]; [self notifyTabChanged:tab];
[_observers tabModel:self didFinishLoadingTab:tab success:success]; [_observers tabModel:self didFinishLoadingTab:tab];
} }
- (void)notifyNewTabWillOpen:(Tab*)tab inBackground:(BOOL)background { - (void)notifyNewTabWillOpen:(Tab*)tab inBackground:(BOOL)background {
...@@ -938,7 +938,7 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) { ...@@ -938,7 +938,7 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) {
- (void)webState:(web::WebState*)webState didLoadPageWithSuccess:(BOOL)success { - (void)webState:(web::WebState*)webState didLoadPageWithSuccess:(BOOL)success {
DCHECK(!webState->IsLoading()); DCHECK(!webState->IsLoading());
Tab* tab = LegacyTabHelper::GetTabForWebState(webState); Tab* tab = LegacyTabHelper::GetTabForWebState(webState);
[self notifyTabFinishedLoading:tab success:success]; [self notifyTabFinishedLoading:tab];
RecordInterfaceOrientationMetric(); RecordInterfaceOrientationMetric();
RecordMainFrameNavigationMetric(webState); RecordMainFrameNavigationMetric(webState);
......
...@@ -66,11 +66,8 @@ ...@@ -66,11 +66,8 @@
// |tab| started loading a new URL. // |tab| started loading a new URL.
- (void)tabModel:(TabModel*)model didStartLoadingTab:(Tab*)tab; - (void)tabModel:(TabModel*)model didStartLoadingTab:(Tab*)tab;
// |tab| finished loading a new URL. |success| is YES if the load was // |tab| finished loading a new URL.
// successful. - (void)tabModel:(TabModel*)model didFinishLoadingTab:(Tab*)tab;
- (void)tabModel:(TabModel*)model
didFinishLoadingTab:(Tab*)tab
success:(BOOL)success;
// |tab| has been added to the tab model and will open. If |tab| isn't the // |tab| has been added to the tab model and will open. If |tab| isn't the
// active tab, |inBackground| is YES, NO otherwise. // active tab, |inBackground| is YES, NO otherwise.
......
...@@ -820,7 +820,7 @@ NSString* const kBrowserViewControllerSnackbarCategory = ...@@ -820,7 +820,7 @@ NSString* const kBrowserViewControllerSnackbarCategory =
// Called when either a tab finishes loading or when a tab with finished content // Called when either a tab finishes loading or when a tab with finished content
// is added directly to the model via pre-rendering. The tab must be non-nil and // is added directly to the model via pre-rendering. The tab must be non-nil and
// must be a member of the tab model controlled by this BrowserViewController. // must be a member of the tab model controlled by this BrowserViewController.
- (void)tabLoadComplete:(Tab*)tab withSuccess:(BOOL)success; - (void)tabLoadComplete:(Tab*)tab;
// Adds a new tab with |url| and |postData| at the end of the model, and make it // Adds a new tab with |url| and |postData| at the end of the model, and make it
// the selected tab and return it. // the selected tab and return it.
- (Tab*)addSelectedTabWithURL:(const GURL&)url - (Tab*)addSelectedTabWithURL:(const GURL&)url
...@@ -2843,7 +2843,7 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint { ...@@ -2843,7 +2843,7 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
// Called when either a tab finishes loading or when a tab with finished content // Called when either a tab finishes loading or when a tab with finished content
// is added directly to the model via pre-rendering. // is added directly to the model via pre-rendering.
- (void)tabLoadComplete:(Tab*)tab withSuccess:(BOOL)success { - (void)tabLoadComplete:(Tab*)tab {
DCHECK(tab && ([_model indexOfTab:tab] != NSNotFound)); DCHECK(tab && ([_model indexOfTab:tab] != NSNotFound));
// Persist the session on a delay. // Persist the session on a delay.
...@@ -3722,10 +3722,6 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint { ...@@ -3722,10 +3722,6 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
web::PolicyForNavigation(url, referrer)); web::PolicyForNavigation(url, referrer));
} }
- (BOOL)isTabWithIDCurrent:(NSString*)sessionID {
return self.visible && [sessionID isEqualToString:[_model currentTab].tabId];
}
#pragma mark - OverscrollActionsControllerDelegate methods. #pragma mark - OverscrollActionsControllerDelegate methods.
- (void)overscrollActionsController:(OverscrollActionsController*)controller - (void)overscrollActionsController:(OverscrollActionsController*)controller
...@@ -4296,7 +4292,7 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint { ...@@ -4296,7 +4292,7 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
->DidPromotePrerenderTab(); ->DidPromotePrerenderTab();
} }
[self tabLoadComplete:newTab withSuccess:newTab.loadFinished]; [self tabLoadComplete:newTab];
return; return;
} }
} }
...@@ -4873,11 +4869,9 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint { ...@@ -4873,11 +4869,9 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
} }
} }
- (void)tabModel:(TabModel*)model - (void)tabModel:(TabModel*)model didFinishLoadingTab:(Tab*)tab {
didFinishLoadingTab:(Tab*)tab
success:(BOOL)success {
[_toolbarUIUpdater updateState]; [_toolbarUIUpdater updateState];
[self tabLoadComplete:tab withSuccess:success]; [self tabLoadComplete:tab];
if ([self canShowTabStrip]) { if ([self canShowTabStrip]) {
UIUserInterfaceSizeClass sizeClass = UIUserInterfaceSizeClass sizeClass =
self.view.window.traitCollection.horizontalSizeClass; self.view.window.traitCollection.horizontalSizeClass;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment