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

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

Issue 2761343002: [ios] Adds LocationBarCoordinator. (Closed)
Patch Set: Rebased. 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 side-by-side diff with in-line comments
Download patch
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..7fac457f55badd08a96402ac9ecc2767c14dad4f
--- /dev/null
+++ b/ios/clean/chrome/browser/ui/omnibox/location_bar_view_controller.mm
@@ -0,0 +1,41 @@
+// 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)viewDidLoad {
+ self.omnibox.autoresizingMask =
+ UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+ self.omnibox.frame = self.view.bounds;
+ [self.view addSubview:self.omnibox];
+}
+
+@end
« 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