Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "ios/clean/chrome/browser/ui/bookmarks/bookmarks_coordinator.h" | |
| 6 | |
| 7 #import "ios/chrome/browser/ui/bookmarks/bookmark_controller_factory.h" | |
| 8 #import "ios/chrome/browser/ui/bookmarks/bookmark_home_handset_view_controller.h " | |
| 9 #import "ios/chrome/browser/ui/bookmarks/bookmark_home_tablet_ntp_controller.h" | |
| 10 #include "ios/chrome/browser/ui/ui_util.h" | |
| 11 #import "ios/shared/chrome/browser/coordinator_context/coordinator_context.h" | |
| 12 #import "ios/shared/chrome/browser/ui/browser_list/browser.h" | |
| 13 #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal. h" | |
| 14 | |
| 15 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
| 16 #error "This file requires ARC support." | |
| 17 #endif | |
| 18 | |
| 19 @interface BookmarksCoordinator () | |
| 20 @property(nonatomic, strong) UIViewController* viewController; | |
| 21 @property(nonatomic, strong) | |
| 22 BookmarkHomeTabletNTPController* wrapperViewController; | |
|
lpromero
2017/04/06 13:01:04
This class is not a view controller. Consider rena
justincohen
2017/04/06 18:25:09
Done, here and everywhere.
| |
| 23 @end | |
| 24 | |
| 25 @implementation BookmarksCoordinator | |
| 26 @synthesize viewController = _viewController; | |
| 27 @synthesize wrapperViewController = _wrapperViewController; | |
| 28 | |
| 29 - (void)start { | |
| 30 // HACK: Re-using old view controllers for now. | |
| 31 if (!IsIPadIdiom()) { | |
| 32 self.viewController = [[BookmarkHomeHandsetViewController alloc] | |
| 33 initWithLoader:nil | |
| 34 browserState:self.browser->browser_state()]; | |
| 35 self.viewController.modalPresentationStyle = UIModalPresentationFormSheet; | |
| 36 } else { | |
| 37 BookmarkControllerFactory* factory = | |
| 38 [[BookmarkControllerFactory alloc] init]; | |
| 39 self.wrapperViewController = [factory | |
| 40 bookmarkPanelControllerForBrowserState:self.browser->browser_state() | |
| 41 loader:nil | |
| 42 colorCache:nil]; | |
| 43 self.viewController = [[UIViewController alloc] init]; | |
| 44 self.viewController.view = [self.wrapperViewController view]; | |
|
rohitrao (ping after 24h)
2017/04/06 13:08:13
Is it ok to assign to |view| like this, or should
marq (ping after 24h)
2017/04/06 14:30:13
|view| is a public writable property, so implicitl
justincohen
2017/04/06 18:25:09
This is a temporary solution that will go away..
justincohen
2017/04/06 18:25:09
I think this is OK for now.
| |
| 45 } | |
| 46 [super start]; | |
| 47 } | |
| 48 | |
| 49 @end | |
| OLD | NEW |