Chromium Code Reviews| Index: ios/clean/chrome/browser/ui/omnibox/location_bar_view_controller.mm |
| diff --git a/ios/clean/chrome/browser/ui/omnibox/location_bar_view_controller.mm b/ios/clean/chrome/browser/ui/omnibox/location_bar_view_controller.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2ef181e2f4b43773e0ba86ad37b7eaa472b173db |
| --- /dev/null |
| +++ b/ios/clean/chrome/browser/ui/omnibox/location_bar_view_controller.mm |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2017 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/clean/chrome/browser/ui/omnibox/location_bar_view_controller.h" |
| + |
| +#import "ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h" |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +@interface LocationBarViewController () |
| +@property(nonatomic, readwrite, strong) OmniboxTextFieldIOS* omnibox; |
| +@end |
| + |
| +@implementation LocationBarViewController |
| + |
| +@synthesize omnibox = _omnibox; |
| + |
| +- (instancetype)init { |
| + if ((self = [super init])) { |
| + UIColor* textColor = [UIColor blackColor]; |
| + UIColor* tintColor = nil; |
| + _omnibox = |
| + [[OmniboxTextFieldIOS alloc] initWithFrame:CGRectZero |
| + font:[UIFont systemFontOfSize:14] |
| + textColor:textColor |
| + tintColor:tintColor]; |
| + } |
| + return self; |
| +} |
| + |
| +- (void)loadView { |
| + self.view = [[UIView alloc] initWithFrame:CGRectZero]; |
|
marq (ping after 24h)
2017/04/05 14:59:11
Add a comment indicating why this is needed instea
rohitrao (ping after 24h)
2017/04/05 15:17:09
I didn't know we got a plain old UIView by default
|
| +} |
| + |
| +- (void)viewDidLoad { |
| + self.omnibox.autoresizingMask = |
| + UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; |
| + self.omnibox.frame = self.view.bounds; |
| + [self.view addSubview:self.omnibox]; |
| +} |
| + |
| +@end |