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

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: 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;
marq (ping after 24h) 2017/04/05 12:22:48 The base class already has this as a property. Nor
justincohen 2017/04/05 19:28:23 The base class is read only?
21 @property(nonatomic, strong)
22 BookmarkHomeTabletNTPController* wrapperViewController;
marq (ping after 24h) 2017/04/05 12:22:48 Comment for this property.
justincohen 2017/04/05 19:28:23 Done.
23 @end
24
25 @implementation BookmarksCoordinator
26 @synthesize viewController = _viewController;
27 @synthesize wrapperViewController = _wrapperViewController;
28
29 - (void)start {
30 // PLACEHOLDER: Re-using old view controllers for now.
marq (ping after 24h) 2017/04/05 12:22:48 More of a HACK: (placeholder is a throw-away impl
justincohen 2017/04/05 19:28:23 Done.
31 if (!IsIPadIdiom()) {
32 self.viewController = [[BookmarkHomeHandsetViewController alloc]
33 initWithLoader:nil
34 browserState:self.browser->browser_state()];
35 self.viewController.modalPresentationStyle = UIModalPresentationFormSheet;
36 [self.context.baseViewController presentViewController:self.viewController
marq (ping after 24h) 2017/04/05 12:22:48 I think our preferred technique is for the parent
justincohen 2017/04/05 19:28:23 Done.
37 animated:self.context.animated
38 completion:nil];
39 } else {
40 BookmarkControllerFactory* factory =
41 [[BookmarkControllerFactory alloc] init];
42 self.wrapperViewController = [factory
43 bookmarkPanelControllerForBrowserState:self.browser->browser_state()
44 loader:nil
45 colorCache:nil];
46 self.viewController = [[UIViewController alloc] init];
marq (ping after 24h) 2017/04/05 12:22:47 Does this ever get presented or added anywhere?
justincohen 2017/04/05 19:28:23 Yes, it gets added in the NTP iPad scroll view.
47 self.viewController.view = [self.wrapperViewController view];
48 }
49 [super start];
50 }
51
52 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698