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

Side by Side Diff: ios/clean/chrome/browser/ui/omnibox/location_bar_view_controller.mm

Issue 2761343002: [ios] Adds LocationBarCoordinator. (Closed)
Patch Set: Review Created 3 years, 8 months 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
(Empty)
1 // Copyright 2017 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/clean/chrome/browser/ui/omnibox/location_bar_view_controller.h"
6
7 #import "ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h"
8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
13 @interface LocationBarViewController ()
14 @property(nonatomic, readwrite, strong) OmniboxTextFieldIOS* omnibox;
15 @end
16
17 @implementation LocationBarViewController
18
19 @synthesize omnibox = _omnibox;
20
21 - (instancetype)init {
22 if ((self = [super init])) {
23 UIColor* textColor = [UIColor blackColor];
24 UIColor* tintColor = nil;
25 _omnibox =
26 [[OmniboxTextFieldIOS alloc] initWithFrame:CGRectZero
27 font:[UIFont systemFontOfSize:14]
28 textColor:textColor
29 tintColor:tintColor];
30 }
31 return self;
32 }
33
34 - (void)loadView {
35 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
36 }
37
38 - (void)viewDidLoad {
39 self.omnibox.autoresizingMask =
40 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
41 self.omnibox.frame = self.view.bounds;
42 [self.view addSubview:self.omnibox];
43 }
44
45 @end
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/omnibox/location_bar_view_controller.h ('k') | ios/clean/chrome/browser/ui/toolbar/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698