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

Side by Side Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2705113004: Do not use TabModel inside BlockedPopupInfo handler block. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/browser_view_controller.h" 5 #import "ios/chrome/browser/ui/browser_view_controller.h"
6 6
7 #import <AssetsLibrary/AssetsLibrary.h> 7 #import <AssetsLibrary/AssetsLibrary.h>
8 #import <MobileCoreServices/MobileCoreServices.h> 8 #import <MobileCoreServices/MobileCoreServices.h>
9 #import <PassKit/PassKit.h> 9 #import <PassKit/PassKit.h>
10 #import <Photos/Photos.h> 10 #import <Photos/Photos.h>
(...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2369 return tab.webState; 2369 return tab.webState;
2370 } 2370 }
2371 case WindowOpenDisposition::CURRENT_TAB: { 2371 case WindowOpenDisposition::CURRENT_TAB: {
2372 web::NavigationManager::WebLoadParams loadParams(params.url); 2372 web::NavigationManager::WebLoadParams loadParams(params.url);
2373 loadParams.referrer = params.referrer; 2373 loadParams.referrer = params.referrer;
2374 loadParams.transition_type = params.transition; 2374 loadParams.transition_type = params.transition;
2375 loadParams.is_renderer_initiated = params.is_renderer_initiated; 2375 loadParams.is_renderer_initiated = params.is_renderer_initiated;
2376 webState->GetNavigationManager()->LoadURLWithParams(loadParams); 2376 webState->GetNavigationManager()->LoadURLWithParams(loadParams);
2377 return webState; 2377 return webState;
2378 } 2378 }
2379 case WindowOpenDisposition::NEW_POPUP: {
2380 Tab* tab = [[self tabModel]
2381 insertOrUpdateTabWithURL:params.url
2382 referrer:params.referrer
2383 transition:params.transition
2384 windowName:nil
2385 opener:LegacyTabHelper::GetTabForWebState(webState)
2386 openedByDOM:YES
2387 atIndex:TabModelConstants::kTabPositionAutomatically
2388 inBackground:NO];
2389 return tab.webState;
2390 }
2379 default: 2391 default:
2380 NOTIMPLEMENTED(); 2392 NOTIMPLEMENTED();
2381 return nullptr; 2393 return nullptr;
2382 }; 2394 };
2383 } 2395 }
2384 2396
2385 - (BOOL)webState:(web::WebState*)webState 2397 - (BOOL)webState:(web::WebState*)webState
2386 handleContextMenu:(const web::ContextMenuParams&)params { 2398 handleContextMenu:(const web::ContextMenuParams&)params {
2387 // Prevent context menu from displaying for a tab which is no longer the 2399 // Prevent context menu from displaying for a tab which is no longer the
2388 // current one. 2400 // current one.
(...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after
5013 5025
5014 - (UIView*)voiceSearchButton { 5026 - (UIView*)voiceSearchButton {
5015 return _voiceSearchButton; 5027 return _voiceSearchButton;
5016 } 5028 }
5017 5029
5018 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5030 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5019 return [self currentLogoAnimationControllerOwner]; 5031 return [self currentLogoAnimationControllerOwner];
5020 } 5032 }
5021 5033
5022 @end 5034 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698