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

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: Fix last nits 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
7 #import "CrNet.h"
8
9 @implementation CrNetConsumerViewController {
10 UIWebView* _webView;
11 }
12
13 - (void)viewDidLoad {
14 self.view.backgroundColor = [UIColor whiteColor];
15
16 UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem];
17 [button setTitle:@"chromium.org" forState:UIControlStateNormal];
18 [button setFrame:CGRectMake(5, 0, 95, 50)];
19 [button addTarget:self
20 action:@selector(loadChromium)
21 forControlEvents:UIControlEventTouchUpInside];
22 [self.view addSubview:button];
23
24 _webView = [[UIWebView alloc]
25 initWithFrame:CGRectMake(0,
26 52,
27 self.view.bounds.size.width,
28 self.view.bounds.size.height - 52)];
29 [self.view addSubview:_webView];
30 _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth |
31 UIViewAutoresizingFlexibleHeight;
32
33 [self loadChromium];
34 }
35
36 // Disable the status bar to sidestep all the iOS7 status bar issues.
37 - (BOOL)prefersStatusBarHidden {
38 return YES;
39 }
40
41 - (void)loadChromium {
42 [_webView loadRequest:[NSURLRequest requestWithURL:
43 [NSURL URLWithString:@"https://www.chromium.org"]]];
44 }
45
46 @end
OLDNEW
« no previous file with comments | « ios/crnet/crnet_consumer/crnet_consumer_view_controller.h ('k') | ios/crnet/crnet_consumer/main.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698