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

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

Issue 2886043003: [ObjC ARC] Converts ios/chrome/browser/ui/main:main to ARC. (Closed)
Patch Set: comments Created 3 years, 6 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
« no previous file with comments | « ios/chrome/browser/ui/main/main_view_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/main/main_view_controller.h" 5 #import "ios/chrome/browser/ui/main/main_view_controller.h"
6 6
7 #import "base/logging.h" 7 #import "base/logging.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 @implementation MainViewController 13 @implementation MainViewController
10 14
11 - (UIViewController*)activeViewController { 15 - (UIViewController*)activeViewController {
12 return [self.childViewControllers firstObject]; 16 return [self.childViewControllers firstObject];
13 } 17 }
14 18
15 - (void)setActiveViewController:(UIViewController*)activeViewController { 19 - (void)setActiveViewController:(UIViewController*)activeViewController {
16 DCHECK(activeViewController); 20 DCHECK(activeViewController);
17 if (self.activeViewController == activeViewController) 21 if (self.activeViewController == activeViewController)
18 return; 22 return;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return self.activeViewController; 71 return self.activeViewController;
68 } 72 }
69 73
70 - (BOOL)shouldAutorotate { 74 - (BOOL)shouldAutorotate {
71 return self.activeViewController 75 return self.activeViewController
72 ? [self.activeViewController shouldAutorotate] 76 ? [self.activeViewController shouldAutorotate]
73 : [super shouldAutorotate]; 77 : [super shouldAutorotate];
74 } 78 }
75 79
76 @end 80 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/main/main_view_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698