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

Side by Side Diff: ios/chrome/browser/ui/orientation_limiting_navigation_controller.mm

Issue 2569213002: [ObjC ARC] Reland of Converts ios/chrome/browser/ui:ui to ARC. (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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/orientation_limiting_navigation_controller.h" 5 #import "ios/chrome/browser/ui/orientation_limiting_navigation_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ios/chrome/browser/ui/ui_util.h" 8 #include "ios/chrome/browser/ui/ui_util.h"
9 9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
10 @implementation OrientationLimitingNavigationController 14 @implementation OrientationLimitingNavigationController
11 15
12 - (NSUInteger)supportedInterfaceOrientations { 16 - (NSUInteger)supportedInterfaceOrientations {
13 return IsIPadIdiom() ? [super supportedInterfaceOrientations] 17 return IsIPadIdiom() ? [super supportedInterfaceOrientations]
14 : UIInterfaceOrientationMaskPortrait; 18 : UIInterfaceOrientationMaskPortrait;
15 } 19 }
16 20
17 - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { 21 - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
18 return IsIPadIdiom() ? [super preferredInterfaceOrientationForPresentation] 22 return IsIPadIdiom() ? [super preferredInterfaceOrientationForPresentation]
19 : UIInterfaceOrientationPortrait; 23 : UIInterfaceOrientationPortrait;
20 } 24 }
21 25
22 - (BOOL)shouldAutorotate { 26 - (BOOL)shouldAutorotate {
23 return IsIPadIdiom() ? [super shouldAutorotate] : NO; 27 return IsIPadIdiom() ? [super shouldAutorotate] : NO;
24 } 28 }
25 29
26 @end 30 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/native_content_controller.mm ('k') | ios/chrome/browser/ui/reversed_animation.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698