OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/chrome/browser/ui/orientation_limiting_navigation_controller.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "ios/chrome/browser/ui/ui_util.h" |
| 9 |
| 10 @implementation OrientationLimitingNavigationController |
| 11 |
| 12 - (NSUInteger)supportedInterfaceOrientations { |
| 13 return IsIPadIdiom() ? [super supportedInterfaceOrientations] |
| 14 : UIInterfaceOrientationMaskPortrait; |
| 15 } |
| 16 |
| 17 - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { |
| 18 return IsIPadIdiom() ? [super preferredInterfaceOrientationForPresentation] |
| 19 : UIInterfaceOrientationPortrait; |
| 20 } |
| 21 |
| 22 - (BOOL)shouldAutorotate { |
| 23 return IsIPadIdiom() ? [super shouldAutorotate] : NO; |
| 24 } |
| 25 |
| 26 @end |
OLD | NEW |