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

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

Issue 2740473002: DownloadManagerController now uses WebState (Closed)
Patch Set: 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 unified diff | Download patch
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 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 - (void)closeThisTab { 1444 - (void)closeThisTab {
1445 if (!parentTabModel_) 1445 if (!parentTabModel_)
1446 return; 1446 return;
1447 1447
1448 NSUInteger index = [parentTabModel_ indexOfTab:self]; 1448 NSUInteger index = [parentTabModel_ indexOfTab:self];
1449 if (index != NSNotFound) 1449 if (index != NSNotFound)
1450 [parentTabModel_ closeTabAtIndex:index]; 1450 [parentTabModel_ closeTabAtIndex:index];
1451 } 1451 }
1452 1452
1453 - (id<CRWNativeContent>)controllerForUnhandledContentAtURL:(const GURL&)url { 1453 - (id<CRWNativeContent>)controllerForUnhandledContentAtURL:(const GURL&)url {
1454 StoreKitTabHelper* helper = StoreKitTabHelper::FromWebState(self.webState);
1455 if (!helper)
1456 return nil;
1457 id<StoreKitLauncher> storeKitLauncher = helper->GetLauncher();
1458 if (!storeKitLauncher)
1459 return nil;
rohitrao (ping after 24h) 2017/03/07 13:51:22 There is a small logic change here, in that the ol
pkl (ping after 24h if needed) 2017/03/07 22:22:01 I added a check to download manager controller to
1460 DownloadManagerController* downloadController = 1454 DownloadManagerController* downloadController =
1461 [[[DownloadManagerController alloc] 1455 [[[DownloadManagerController alloc] initWithWebState:self.webState
rohitrao (ping after 24h) 2017/03/07 13:51:22 This addresses the "followup" comments that I left
pkl (ping after 24h if needed) 2017/03/07 22:07:19 Acknowledged.
1462 initWithURL:url 1456 downloadURL:url] autorelease];
1463 requestContextGetter:browserState_->GetRequestContext()
1464 storeKitLauncher:storeKitLauncher] autorelease];
1465 [downloadController start]; 1457 [downloadController start];
1466 return downloadController; 1458 return downloadController;
1467 } 1459 }
1468 1460
1469 - (void)handleExportableFile:(net::HttpResponseHeaders*)headers { 1461 - (void)handleExportableFile:(net::HttpResponseHeaders*)headers {
1470 // Only "application/pdf" is supported for now. 1462 // Only "application/pdf" is supported for now.
1471 if (self.webState->GetContentsMimeType() != "application/pdf") 1463 if (self.webState->GetContentsMimeType() != "application/pdf")
1472 return; 1464 return;
1473 1465
1474 [[NSNotificationCenter defaultCenter] 1466 [[NSNotificationCenter defaultCenter]
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 2234
2243 - (TabModel*)parentTabModel { 2235 - (TabModel*)parentTabModel {
2244 return parentTabModel_; 2236 return parentTabModel_;
2245 } 2237 }
2246 2238
2247 - (FormInputAccessoryViewController*)inputAccessoryViewController { 2239 - (FormInputAccessoryViewController*)inputAccessoryViewController {
2248 return inputAccessoryViewController_.get(); 2240 return inputAccessoryViewController_.get();
2249 } 2241 }
2250 2242
2251 @end 2243 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/downloads/BUILD.gn » ('j') | ios/chrome/browser/ui/downloads/download_manager_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698