Commit d89f616b authored by lpromero's avatar lpromero Committed by Commit bot

Remove ios web shell MainView.xib.

BUG=621377,499591
R=marq@chromium.org

Review-Url: https://codereview.chromium.org/2080123003
Cr-Commit-Position: refs/heads/master@{#401573}
parent b5156c9e
......@@ -55,7 +55,6 @@
],
'mac_bundle_resources': [
'shell/Default.png',
'shell/MainView.xib',
'shell/textfield_background@2x.png',
'shell/toolbar_back@2x.png',
'shell/toolbar_forward@2x.png',
......
......@@ -32,11 +32,6 @@ ios_app_bundle("ios_web_shell") {
assert_no_deps = ios_assert_no_deps
}
bundle_data_xib("main_view_bundle_data") {
visibility = [ ":shell" ]
source = "MainView.xib"
}
bundle_data("shell_bundle_data") {
visibility = [ ":shell" ]
sources = [
......@@ -71,7 +66,6 @@ source_set("shell") {
]
deps = [
":main_view_bundle_data",
":shell_bundle_data",
"//base",
"//ios/net",
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5053" systemVersion="13D65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment version="1552" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ViewController">
<connections>
<outlet property="containerView" destination="HS4-2y-YS7" id="KRU-Lk-zhW"/>
<outlet property="toolbarView" destination="Mtt-2S-TM5" id="Ngt-zy-T1l"/>
<outlet property="view" destination="iN0-l3-epB" id="0A6-5l-qvv"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="Mtt-2S-TM5">
<rect key="frame" x="0.0" y="20" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<inset key="insetFor6xAndEarlier" minX="0.0" minY="20" maxX="0.0" maxY="-20"/>
<items/>
<color key="barTintColor" red="0.33725490196078434" green="0.46666666666666667" blue="0.9882352941176471" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="delegate" destination="-1" id="80Y-wy-gHw"/>
</connections>
</toolbar>
<view contentMode="scaleToFill" id="HS4-2y-YS7">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<inset key="insetFor6xAndEarlier" minX="0.0" minY="20" maxX="0.0" maxY="0.0"/>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
<inset key="insetFor6xAndEarlier" minX="0.0" minY="0.0" maxX="0.0" maxY="-20"/>
</view>
</objects>
</document>
......@@ -26,8 +26,7 @@ extern NSString* const kWebShellAddressFieldAccessibilityLabel;
@property(nonatomic, strong) IBOutlet UIToolbar* toolbarView;
@property(nonatomic, assign, readonly) web::WebState* webState;
// Initializes a new ViewController from |MainView.xib| using the given
// |browserState|.
// Initializes a new ViewController using the given |browserState|.
- (instancetype)initWithBrowserState:(web::BrowserState*)browserState;
@end
......
......@@ -38,7 +38,8 @@ using web::NavigationManager;
@interface ViewController ()<CRWWebStateDelegate,
CRWWebStateObserver,
UITextFieldDelegate> {
UITextFieldDelegate,
UIToolbarDelegate> {
web::BrowserState* _browserState;
std::unique_ptr<web::WebState> _webState;
std::unique_ptr<web::WebStateObserverBridge> _webStateObserver;
......@@ -55,7 +56,7 @@ using web::NavigationManager;
@synthesize toolbarView = _toolbarView;
- (instancetype)initWithBrowserState:(web::BrowserState*)browserState {
self = [super initWithNibName:@"MainView" bundle:nil];
self = [super initWithNibName:nil bundle:nil];
if (self) {
_browserState = browserState;
}
......@@ -70,6 +71,27 @@ using web::NavigationManager;
- (void)viewDidLoad {
[super viewDidLoad];
CGRect bounds = self.view.bounds;
// Set up the toolbar.
_toolbarView = [[UIToolbar alloc] init];
_toolbarView.barTintColor =
[UIColor colorWithRed:0.337 green:0.467 blue:0.988 alpha:1.0];
_toolbarView.frame = CGRectMake(0, 20, CGRectGetWidth(bounds), 44);
_toolbarView.autoresizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;
_toolbarView.delegate = self;
[self.view addSubview:_toolbarView];
// Set up the container view.
_containerView = [[UIView alloc] init];
_containerView.frame =
CGRectMake(0, 64, CGRectGetWidth(bounds), CGRectGetHeight(bounds) - 64);
_containerView.backgroundColor = [UIColor lightGrayColor];
_containerView.autoresizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:_containerView];
// Set up the toolbar buttons.
UIButton* back = [UIButton buttonWithType:UIButtonTypeCustom];
[back setImage:[UIImage imageNamed:@"toolbar_back"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment