Commit ce5d7805 authored by edchin's avatar edchin Committed by Commit Bot

[ios] Remove more unnecessary references to Tab in BVC

Two private methods in BVC take in a WebState as an argument.
They call the TabHelper to get the corresponding Tab, then never use
the Tab reference.
This CL removes these unnecessary references to Tab.

Change-Id: Ie5be3d4600fafe9bd4777ece6717eb67525e8c30
Reviewed-on: https://chromium-review.googlesource.com/c/1344835Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarMohammad Refaat <mrefaat@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610206}
parent b261389b
...@@ -2993,8 +2993,6 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint ...@@ -2993,8 +2993,6 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint
- (BOOL)canTakeSnapshotForWebState:(web::WebState*)webState { - (BOOL)canTakeSnapshotForWebState:(web::WebState*)webState {
DCHECK(webState); DCHECK(webState);
Tab* tab = LegacyTabHelper::GetTabForWebState(webState);
DCHECK([self.tabModel indexOfTab:tab] != NSNotFound);
PagePlaceholderTabHelper* pagePlaceholderTabHelper = PagePlaceholderTabHelper* pagePlaceholderTabHelper =
PagePlaceholderTabHelper::FromWebState(webState); PagePlaceholderTabHelper::FromWebState(webState);
return !pagePlaceholderTabHelper->displaying_placeholder() && return !pagePlaceholderTabHelper->displaying_placeholder() &&
...@@ -3003,9 +3001,6 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint ...@@ -3003,9 +3001,6 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint
- (UIEdgeInsets)snapshotEdgeInsetsForWebState:(web::WebState*)webState { - (UIEdgeInsets)snapshotEdgeInsetsForWebState:(web::WebState*)webState {
DCHECK(webState); DCHECK(webState);
Tab* tab = LegacyTabHelper::GetTabForWebState(webState);
DCHECK([self.tabModel indexOfTab:tab] != NSNotFound);
// The NTP's snapshot should be inset |headerHeight| from the top to remove // The NTP's snapshot should be inset |headerHeight| from the top to remove
// the fake NTP toolbar from the snapshot. // the fake NTP toolbar from the snapshot.
NewTabPageTabHelper* NTPHelper = NewTabPageTabHelper::FromWebState(webState); NewTabPageTabHelper* NTPHelper = NewTabPageTabHelper::FromWebState(webState);
......
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