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

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2737943003: Moved window opening callback to WebStateDelegate. (Closed)
Patch Set: Rebased Created 3 years, 9 months 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 | « no previous file | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 6bd1381b25716ba7bd1a0b8c195d1779e24cce1b..7301b09ff9e1243b9b10fcc3ad6cbc3d18c7e164 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1985,39 +1985,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
[delegate_ discardPrerender];
}
-- (CRWWebController*)webController:(CRWWebController*)webController
- createWebControllerForURL:(const GURL&)URL
- openerURL:(const GURL&)openerURL
- initiatedByUser:(BOOL)initiatedByUser {
- // Check if requested web controller is a popup and block it if necessary.
- if (!initiatedByUser) {
- web::WebState* webState = webController.webState;
- auto* helper = BlockedPopupTabHelper::FromWebState(webState);
- if (helper->ShouldBlockPopup(openerURL)) {
- web::NavigationItem* item =
- webState->GetNavigationManager()->GetLastCommittedItem();
- web::Referrer referrer(openerURL, item->GetReferrer().policy);
- helper->HandlePopup(URL, referrer);
- return nil;
- }
- }
-
- // Requested web controller should not be blocked from opening.
- [self updateSnapshotWithOverlay:YES visibleFrameOnly:YES];
-
- // Tabs open by DOM are always renderer initiated.
- web::NavigationManager::WebLoadParams params(GURL{});
- params.transition_type = ui::PAGE_TRANSITION_LINK;
- params.is_renderer_initiated = YES;
- Tab* tab = [parentTabModel_
- insertTabWithLoadParams:params
- opener:self
- openedByDOM:YES
- atIndex:TabModelConstants::kTabPositionAutomatically
- inBackground:NO];
- return tab.webController;
-}
-
- (CGFloat)headerHeightForWebController:(CRWWebController*)webController {
return [self.tabHeadersDelegate headerHeightForTab:self];
}
« no previous file with comments | « no previous file | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698