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

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

Issue 1058933002: [iOS] Upstream //ios/chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@upstreamMemory
Patch Set: Review comments Created 5 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 2012 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 "ios/chrome/browser/ui/native_content_controller.h"
6
7 #import <UIKit/UIKit.h>
8
9 #include "base/mac/bundle_locations.h"
10 #import "base/mac/foundation_util.h"
11 #include "base/mac/objc_property_releaser.h"
12
13 @implementation NativeContentController {
14 base::mac::ObjCPropertyReleaser _propertyReleaser_NativeContentController;
15 }
16
17 @synthesize view = _view;
18 @synthesize title = _title;
19 @synthesize url = _url;
20
21 - (instancetype)initWithNibName:(NSString*)nibName url:(const GURL&)url {
22 self = [super init];
23 if (self) {
24 _propertyReleaser_NativeContentController.Init(
25 self, [NativeContentController class]);
26 [base::mac::FrameworkBundle() loadNibNamed:nibName owner:self options:nil];
27 _url = url;
28 }
29 return self;
30 }
31
32 - (instancetype)initWithURL:(const GURL&)url {
33 self = [super init];
34 if (self) {
35 _propertyReleaser_NativeContentController.Init(
36 self, [NativeContentController class]);
37 _url = url;
38 }
39 return self;
40 }
41
42 - (void)dealloc {
43 [_view removeFromSuperview];
44 [super dealloc];
45 }
46
47 - (void)handleLowMemory {
48 // TODO(pinkerton): What should this do? Toss the view?
49 }
50
51 - (BOOL)isViewAlive {
52 // TODO(pinkerton): See handleLowMemory above.
53 return YES;
54 }
55
56 - (void)reload {
57 // Not implemented in base class.
58 }
59
60 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/native_content_controller.h ('k') | ios/chrome/browser/ui/orientation_limiting_navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698