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

Side by Side Diff: components/cronet/ios/sample/cronet_sample_view_controller.m

Issue 2807283002: [Cronet] Build static libcronet.a for iOS with complete dependencies. (Closed)
Patch Set: Created 3 years, 8 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 2017 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 "cronet_sample_view_controller.h"
6
7 #import "components/cronet/ios/Cronet.h"
8
9 @implementation CronetSampleViewController {
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, 52, self.view.bounds.size.width,
26 self.view.bounds.size.height - 52)];
27 [self.view addSubview:_webView];
28 _webView.autoresizingMask =
29 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
30
31 [self loadChromium];
32 }
33
34 // Disable the status bar to sidestep all the iOS7 status bar issues.
35 - (BOOL)prefersStatusBarHidden {
36 return YES;
37 }
38
39 - (void)loadChromium {
40 [_webView
41 loadRequest:[NSURLRequest
42 requestWithURL:
43 [NSURL URLWithString:@"https://www.chromium.org"]]];
44 }
45
46 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698