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;
// Notifies observers that the given tab is loading a new URL.
- (void)notifyTabLoading:(Tab*)tab;
// Notifies observers that the given tab finished loading. |success| is YES if
// the load was successful, NO otherwise.
- (void)notifyTabFinishedLoading:(Tab*)tab success:(BOOL)success;
// Notifies observers that the given tab finished loading.
- (void)notifyTabFinishedLoading:(Tab*)tab;
// Notifies observers that the given tab will open. If it isn't the active tab,
// |background| is YES, NO otherwise.
......
......@@ -582,9 +582,9 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) {
[_observers tabModel:self didStartLoadingTab:tab];
}
- (void)notifyTabFinishedLoading:(Tab*)tab success:(BOOL)success {
- (void)notifyTabFinishedLoading:(Tab*)tab {
[self notifyTabChanged:tab];
[_observers tabModel:self didFinishLoadingTab:tab success:success];
[_observers tabModel:self didFinishLoadingTab:tab];
}
- (void)notifyNewTabWillOpen:(Tab*)tab inBackground:(BOOL)background {
......@@ -938,7 +938,7 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) {
- (void)webState:(web::WebState*)webState didLoadPageWithSuccess:(BOOL)success {
DCHECK(!webState->IsLoading());
Tab* tab = LegacyTabHelper::GetTabForWebState(webState);
[self notifyTabFinishedLoading:tab success:success];
[self notifyTabFinishedLoading:tab];
RecordInterfaceOrientationMetric();
RecordMainFrameNavigationMetric(webState);
......
......@@ -66,11 +66,8 @@
// |tab| started loading a new URL.
- (void)tabModel:(TabModel*)model didStartLoadingTab:(Tab*)tab;
// |tab| finished loading a new URL. |success| is YES if the load was
// successful.
- (void)tabModel:(TabModel*)model
didFinishLoadingTab:(Tab*)tab
success:(BOOL)success;
// |tab| finished loading a new URL.
- (void)tabModel:(TabModel*)model didFinishLoadingTab:(Tab*)tab;
// |tab| has been added to the tab model and will open. If |tab| isn't the
// active tab, |inBackground| is YES, NO otherwise.
......
......@@ -820,7 +820,7 @@ NSString* const kBrowserViewControllerSnackbarCategory =
// 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
// 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
// the selected tab and return it.
- (Tab*)addSelectedTabWithURL:(const GURL&)url
......@@ -2843,7 +2843,7 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
// Called when either a tab finishes loading or when a tab with finished content
// 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));
// Persist the session on a delay.
......@@ -3722,10 +3722,6 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
web::PolicyForNavigation(url, referrer));
}
- (BOOL)isTabWithIDCurrent:(NSString*)sessionID {
return self.visible && [sessionID isEqualToString:[_model currentTab].tabId];
}
#pragma mark - OverscrollActionsControllerDelegate methods.
- (void)overscrollActionsController:(OverscrollActionsController*)controller
......@@ -4296,7 +4292,7 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
->DidPromotePrerenderTab();
}
[self tabLoadComplete:newTab withSuccess:newTab.loadFinished];
[self tabLoadComplete:newTab];
return;
}
}
......@@ -4873,11 +4869,9 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
}
}
- (void)tabModel:(TabModel*)model
didFinishLoadingTab:(Tab*)tab
success:(BOOL)success {
- (void)tabModel:(TabModel*)model didFinishLoadingTab:(Tab*)tab {
[_toolbarUIUpdater updateState];
[self tabLoadComplete:tab withSuccess:success];
[self tabLoadComplete:tab];
if ([self canShowTabStrip]) {
UIUserInterfaceSizeClass sizeClass =
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