OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/bookmarks/bookmark_navigation_controller.h" | 5 #import "ios/chrome/browser/ui/bookmarks/bookmark_navigation_controller.h" |
6 | 6 |
7 #include "base/mac/scoped_nsobject.h" | |
8 #import "ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.h" | 7 #import "ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.h" |
9 | 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
10 @implementation BookmarkNavigationController | 13 @implementation BookmarkNavigationController |
11 | 14 |
12 - (id)initWithRootViewController:(UIViewController*)rootViewController { | 15 - (id)initWithRootViewController:(UIViewController*)rootViewController { |
13 self = [super initWithRootViewController:rootViewController]; | 16 self = [super initWithRootViewController:rootViewController]; |
14 if (self) { | 17 if (self) { |
15 [self setNavigationBarHidden:YES]; | 18 [self setNavigationBarHidden:YES]; |
16 } | 19 } |
17 return self; | 20 return self; |
18 } | 21 } |
19 | 22 |
20 - (void)viewDidLoad { | 23 - (void)viewDidLoad { |
21 [super viewDidLoad]; | 24 [super viewDidLoad]; |
22 self.view.backgroundColor = [UIColor whiteColor]; | 25 self.view.backgroundColor = [UIColor whiteColor]; |
23 } | 26 } |
24 | 27 |
25 - (BOOL)disablesAutomaticKeyboardDismissal { | 28 - (BOOL)disablesAutomaticKeyboardDismissal { |
26 // This allows us to hide the keyboard when controllers are being displayed in | 29 // This allows us to hide the keyboard when controllers are being displayed in |
27 // a modal form sheet on the iPad. | 30 // a modal form sheet on the iPad. |
28 return NO; | 31 return NO; |
29 } | 32 } |
30 | 33 |
31 #pragma mark - UIResponder | 34 #pragma mark - UIResponder |
32 | 35 |
33 - (BOOL)canBecomeFirstResponder { | 36 - (BOOL)canBecomeFirstResponder { |
34 return YES; | 37 return YES; |
35 } | 38 } |
36 | 39 |
37 @end | 40 @end |
OLD | NEW |