Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/browser_view_controller.h" | 5 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 6 | 6 |
| 7 #import <AssetsLibrary/AssetsLibrary.h> | 7 #import <AssetsLibrary/AssetsLibrary.h> |
| 8 #import <MobileCoreServices/MobileCoreServices.h> | 8 #import <MobileCoreServices/MobileCoreServices.h> |
| 9 #import <PassKit/PassKit.h> | 9 #import <PassKit/PassKit.h> |
| 10 #import <Photos/Photos.h> | 10 #import <Photos/Photos.h> |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1162 } | 1162 } |
| 1163 } | 1163 } |
| 1164 [self addSelectedTabWithURL:GURL(kChromeUINewTabURL) | 1164 [self addSelectedTabWithURL:GURL(kChromeUINewTabURL) |
| 1165 transition:ui::PAGE_TRANSITION_TYPED]; | 1165 transition:ui::PAGE_TRANSITION_TYPED]; |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 #pragma mark - UIViewController methods | 1168 #pragma mark - UIViewController methods |
| 1169 | 1169 |
| 1170 // Perform additional set up after loading the view, typically from a nib. | 1170 // Perform additional set up after loading the view, typically from a nib. |
| 1171 - (void)viewDidLoad { | 1171 - (void)viewDidLoad { |
| 1172 // Duplicate .xib layout for now. | 1172 // Duplicate .xib layout for now. |
|
marq (ping after 24h)
2016/12/20 12:36:36
I think this comment can be removed now.
| |
| 1173 CGRect initialViewsRect = CGRectMake(0, 30, 320, 430); | 1173 CGRect initialViewsRect = self.view.frame; |
| 1174 initialViewsRect.origin.y += StatusBarHeight(); | |
| 1175 initialViewsRect.size.height -= StatusBarHeight(); | |
| 1174 UIViewAutoresizing initialViewAutoresizing = | 1176 UIViewAutoresizing initialViewAutoresizing = |
| 1175 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; | 1177 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; |
| 1176 | 1178 |
| 1177 self.contentArea = [[[BrowserContainerView alloc] | 1179 self.contentArea = [[[BrowserContainerView alloc] |
| 1178 initWithFrame:initialViewsRect] autorelease]; | 1180 initWithFrame:initialViewsRect] autorelease]; |
| 1179 self.contentArea.autoresizingMask = initialViewAutoresizing; | 1181 self.contentArea.autoresizingMask = initialViewAutoresizing; |
| 1180 self.typingShield = | 1182 self.typingShield = |
| 1181 [[[UIButton alloc] initWithFrame:initialViewsRect] autorelease]; | 1183 [[[UIButton alloc] initWithFrame:initialViewsRect] autorelease]; |
| 1182 self.typingShield.autoresizingMask = initialViewAutoresizing; | 1184 self.typingShield.autoresizingMask = initialViewAutoresizing; |
| 1183 [self.typingShield addTarget:self | 1185 [self.typingShield addTarget:self |
| 1184 action:@selector(shieldWasTapped:) | 1186 action:@selector(shieldWasTapped:) |
| 1185 forControlEvents:UIControlEventTouchUpInside]; | 1187 forControlEvents:UIControlEventTouchUpInside]; |
| 1186 self.view.bounds = CGRectMake(0, 0, 320, 460); | |
| 1187 self.view.autoresizingMask = initialViewAutoresizing; | 1188 self.view.autoresizingMask = initialViewAutoresizing; |
| 1188 self.view.backgroundColor = [UIColor colorWithWhite:0.75 alpha:1.0]; | 1189 self.view.backgroundColor = [UIColor colorWithWhite:0.75 alpha:1.0]; |
| 1189 [self.view addSubview:self.contentArea]; | 1190 [self.view addSubview:self.contentArea]; |
| 1190 [self.view addSubview:self.typingShield]; | 1191 [self.view addSubview:self.typingShield]; |
| 1191 [super viewDidLoad]; | 1192 [super viewDidLoad]; |
| 1192 | 1193 |
| 1193 // Install fake status bar for iPad iOS7 | 1194 // Install fake status bar for iPad iOS7 |
| 1194 [self installFakeStatusBar]; | 1195 [self installFakeStatusBar]; |
| 1195 [self buildToolbarAndTabStrip]; | 1196 [self buildToolbarAndTabStrip]; |
| 1196 [self setUpViewLayout]; | 1197 [self setUpViewLayout]; |
| (...skipping 3917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5114 | 5115 |
| 5115 - (UIView*)voiceSearchButton { | 5116 - (UIView*)voiceSearchButton { |
| 5116 return _voiceSearchButton; | 5117 return _voiceSearchButton; |
| 5117 } | 5118 } |
| 5118 | 5119 |
| 5119 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5120 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5120 return [self currentLogoAnimationControllerOwner]; | 5121 return [self currentLogoAnimationControllerOwner]; |
| 5121 } | 5122 } |
| 5122 | 5123 |
| 5123 @end | 5124 @end |
| OLD | NEW |