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

Side by Side Diff: ios/chrome/browser/tabs/tab.mm

Issue 2614023006: [ios] Removed -[CRWWebDelegate openURLWithParams:]. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | 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/tabs/tab.h" 5 #import "ios/chrome/browser/tabs/tab.h"
6 6
7 #import <CoreLocation/CoreLocation.h> 7 #import <CoreLocation/CoreLocation.h>
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1367
1368 if (self.navigationManager) { 1368 if (self.navigationManager) {
1369 CRWSessionController* sessionController = 1369 CRWSessionController* sessionController =
1370 self.navigationManager->GetSessionController(); 1370 self.navigationManager->GetSessionController();
1371 DCHECK([sessionController.entries containsObject:entry]); 1371 DCHECK([sessionController.entries containsObject:entry]);
1372 NSUInteger index = [sessionController.entries indexOfObject:entry]; 1372 NSUInteger index = [sessionController.entries indexOfObject:entry];
1373 self.navigationManager->GoToIndex(index); 1373 self.navigationManager->GoToIndex(index);
1374 } 1374 }
1375 } 1375 }
1376 1376
1377 - (void)openURLWithParams:(const web::WebState::OpenURLParams&)params {
1378 switch (params.disposition) {
1379 case WindowOpenDisposition::NEW_FOREGROUND_TAB:
1380 case WindowOpenDisposition::NEW_BACKGROUND_TAB:
1381 [parentTabModel_
1382 insertOrUpdateTabWithURL:params.url
1383 referrer:params.referrer
1384 transition:params.transition
1385 windowName:nil
1386 opener:self
1387 openedByDOM:NO
1388 atIndex:TabModelConstants::kTabPositionAutomatically
1389 inBackground:(params.disposition ==
1390 WindowOpenDisposition::NEW_BACKGROUND_TAB)];
1391 break;
1392 case WindowOpenDisposition::CURRENT_TAB: {
1393 web::NavigationManager::WebLoadParams loadParams(params.url);
1394 loadParams.referrer = params.referrer;
1395 loadParams.transition_type = params.transition;
1396 loadParams.is_renderer_initiated = params.is_renderer_initiated;
1397 self.navigationManager->LoadURLWithParams(loadParams);
1398 } break;
1399 default:
1400 NOTIMPLEMENTED();
1401 break;
1402 };
1403 }
1404
1405 - (BOOL)openExternalURL:(const GURL&)url linkClicked:(BOOL)linkClicked { 1377 - (BOOL)openExternalURL:(const GURL&)url linkClicked:(BOOL)linkClicked {
1406 if (!externalAppLauncher_.get()) 1378 if (!externalAppLauncher_.get())
1407 externalAppLauncher_.reset([[ExternalAppLauncher alloc] init]); 1379 externalAppLauncher_.reset([[ExternalAppLauncher alloc] init]);
1408 1380
1409 // This method may release CRWWebController which may cause a crash 1381 // This method may release CRWWebController which may cause a crash
1410 // (crbug.com/393949). 1382 // (crbug.com/393949).
1411 [[self.webController retain] autorelease]; 1383 [[self.webController retain] autorelease];
1412 1384
1413 // Make a local url copy for possible modification. 1385 // Make a local url copy for possible modification.
1414 GURL finalURL = url; 1386 GURL finalURL = url;
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 2423
2452 - (TabModel*)parentTabModel { 2424 - (TabModel*)parentTabModel {
2453 return parentTabModel_; 2425 return parentTabModel_;
2454 } 2426 }
2455 2427
2456 - (FormInputAccessoryViewController*)inputAccessoryViewController { 2428 - (FormInputAccessoryViewController*)inputAccessoryViewController {
2457 return inputAccessoryViewController_.get(); 2429 return inputAccessoryViewController_.get();
2458 } 2430 }
2459 2431
2460 @end 2432 @end
OLDNEW
« 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