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

Side by Side Diff: ios/chrome/browser/ui/main/main_coordinator.mm

Issue 2590473002: Upstream Chrome on iOS source code [5/11]. (Closed)
Patch Set: Created 4 years 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 2016 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/chrome/browser/ui/main/main_coordinator.h"
6
7 #include "base/ios/weak_nsobject.h"
8 #include "base/mac/scoped_nsobject.h"
9 #import "ios/chrome/browser/ui/main/main_view_controller.h"
10
11 @interface MainCoordinator () {
12 // Instance variables backing properties of the same name.
13 // |_mainViewController| will be owned by |self.window|.
14 base::WeakNSObject<MainViewController> _mainViewController;
15 }
16
17 @end
18
19 @implementation MainCoordinator
20
21 #pragma mark - property implementation.
22
23 - (MainViewController*)mainViewController {
24 return _mainViewController;
25 }
26
27 #pragma mark - ChromeCoordinator implementation.
28
29 - (void)start {
30 base::scoped_nsobject<MainViewController> mainViewController(
31 [[MainViewController alloc] init]);
32 _mainViewController.reset(mainViewController);
33 self.window.rootViewController = self.mainViewController;
34
35 // Size the main view controller to fit the whole screen.
36 [self.mainViewController.view setFrame:self.window.bounds];
37 }
38
39 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/main/main_coordinator.h ('k') | ios/chrome/browser/ui/main/main_coordinator_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698