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

Side by Side Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2591683002: Initialize the BrowserContainerView with the right frame. (Closed)
Patch Set: Addressed comment. Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 CGRect initialViewsRect = self.view.frame;
1173 CGRect initialViewsRect = CGRectMake(0, 30, 320, 430); 1173 initialViewsRect.origin.y += StatusBarHeight();
1174 initialViewsRect.size.height -= StatusBarHeight();
1174 UIViewAutoresizing initialViewAutoresizing = 1175 UIViewAutoresizing initialViewAutoresizing =
1175 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 1176 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
1176 1177
1177 self.contentArea = [[[BrowserContainerView alloc] 1178 self.contentArea = [[[BrowserContainerView alloc]
1178 initWithFrame:initialViewsRect] autorelease]; 1179 initWithFrame:initialViewsRect] autorelease];
1179 self.contentArea.autoresizingMask = initialViewAutoresizing; 1180 self.contentArea.autoresizingMask = initialViewAutoresizing;
1180 self.typingShield = 1181 self.typingShield =
1181 [[[UIButton alloc] initWithFrame:initialViewsRect] autorelease]; 1182 [[[UIButton alloc] initWithFrame:initialViewsRect] autorelease];
1182 self.typingShield.autoresizingMask = initialViewAutoresizing; 1183 self.typingShield.autoresizingMask = initialViewAutoresizing;
1183 [self.typingShield addTarget:self 1184 [self.typingShield addTarget:self
1184 action:@selector(shieldWasTapped:) 1185 action:@selector(shieldWasTapped:)
1185 forControlEvents:UIControlEventTouchUpInside]; 1186 forControlEvents:UIControlEventTouchUpInside];
1186 self.view.bounds = CGRectMake(0, 0, 320, 460);
1187 self.view.autoresizingMask = initialViewAutoresizing; 1187 self.view.autoresizingMask = initialViewAutoresizing;
1188 self.view.backgroundColor = [UIColor colorWithWhite:0.75 alpha:1.0]; 1188 self.view.backgroundColor = [UIColor colorWithWhite:0.75 alpha:1.0];
1189 [self.view addSubview:self.contentArea]; 1189 [self.view addSubview:self.contentArea];
1190 [self.view addSubview:self.typingShield]; 1190 [self.view addSubview:self.typingShield];
1191 [super viewDidLoad]; 1191 [super viewDidLoad];
1192 1192
1193 // Install fake status bar for iPad iOS7 1193 // Install fake status bar for iPad iOS7
1194 [self installFakeStatusBar]; 1194 [self installFakeStatusBar];
1195 [self buildToolbarAndTabStrip]; 1195 [self buildToolbarAndTabStrip];
1196 [self setUpViewLayout]; 1196 [self setUpViewLayout];
(...skipping 3917 matching lines...) Expand 10 before | Expand all | Expand 10 after
5114 5114
5115 - (UIView*)voiceSearchButton { 5115 - (UIView*)voiceSearchButton {
5116 return _voiceSearchButton; 5116 return _voiceSearchButton;
5117 } 5117 }
5118 5118
5119 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5119 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5120 return [self currentLogoAnimationControllerOwner]; 5120 return [self currentLogoAnimationControllerOwner];
5121 } 5121 }
5122 5122
5123 @end 5123 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698