blob: 4a5e28c281c4a6aa40d03f800a28c1d4e43a2379 [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/orientation_limiting_navigation_controller.h"
#include "base/logging.h"
#include "ios/chrome/browser/ui/ui_util.h"
@implementation OrientationLimitingNavigationController
- (NSUInteger)supportedInterfaceOrientations {
return IsIPadIdiom() ? [super supportedInterfaceOrientations]
: UIInterfaceOrientationMaskPortrait;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return IsIPadIdiom() ? [super preferredInterfaceOrientationForPresentation]
: UIInterfaceOrientationPortrait;
}
- (BOOL)shouldAutorotate {
return IsIPadIdiom() ? [super shouldAutorotate] : NO;
}
@end