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

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: Rebase 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) BookmarkHomeTabletNTPController* wrapperController;
22 @end
23
24 @implementation BookmarksCoordinator
25 @synthesize viewController = _viewController;
26 @synthesize wrapperController = _wrapperController;
27
28 - (void)start {
29 // HACK: Re-using old view controllers for now.
30 if (!IsIPadIdiom()) {
31 self.viewController = [[BookmarkHomeHandsetViewController alloc]
32 initWithLoader:nil
33 browserState:self.browser->browser_state()];
34 self.viewController.modalPresentationStyle = UIModalPresentationFormSheet;
35 } else {
36 BookmarkControllerFactory* factory =
37 [[BookmarkControllerFactory alloc] init];
38 self.wrapperController = [factory
39 bookmarkPanelControllerForBrowserState:self.browser->browser_state()
40 loader:nil
41 colorCache:nil];
42 self.viewController = [[UIViewController alloc] init];
43 self.viewController.view = [self.wrapperController view];
44 }
45 [super start];
46 }
47
48 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698