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

Side by Side Diff: ios/crnet/crnet_consumer/crnet_consumer_view_controller.m

Issue 1125293004: ios: add CrNet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ? Created 5 years, 7 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 2014 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 "crnet_consumer_view_controller.h"
6 #import "CrNet.h"
stuartmorgan 2015/05/21 13:37:59 Blank line above this one.
Elly Fong-Jones 2015/05/21 15:42:49 Done.
7
8 @implementation CrNetConsumerViewController {
9 UIWebView* _webView;
10 }
11
12 - (void)viewDidLoad {
13 self.view.backgroundColor = [UIColor whiteColor];
14
15 UIButton* google = [UIButton buttonWithType:UIButtonTypeSystem];
stuartmorgan 2015/05/21 13:37:59 s/google/loadButton/
Elly Fong-Jones 2015/05/21 15:42:49 Done.
16 [google setTitle:@"chromium.org" forState:UIControlStateNormal];
17 [google setFrame:CGRectMake(5, 0, 95, 50)];
18 [google addTarget:self
19 action:@selector(loadChromium)
20 forControlEvents:UIControlEventTouchUpInside];
21 [self.view addSubview:google];
22
23 _webView = [[UIWebView alloc]
24 initWithFrame:CGRectMake(0,
25 52,
26 self.view.bounds.size.width,
27 self.view.bounds.size.height - 52)];
28 [self.view addSubview:_webView];
29 _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth |
30 UIViewAutoresizingFlexibleHeight;
31
32 [self loadChromium];
33 }
34
35 // Disable the status bar to sidestep all the iOS7 status bar issues.
36 - (BOOL)prefersStatusBarHidden {
37 return YES;
38 }
39
40 - (void)loadChromium {
41 [_webView loadRequest:[NSURLRequest requestWithURL:
42 [NSURL URLWithString:@"https://www.chromium.org"]]];
43 }
44
45 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698