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

Side by Side Diff: ios/clean/chrome/browser/ui/bookmarks/bookmarks_coordinator.mm

Issue 2785893003: [ios clean] Add placeholder for NTP bookmarks, chrome home and open tabs. (Closed)
Patch Set: Address various comments Created 3 years, 8 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698