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

Unified 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, 9 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/native_content_controller.mm
diff --git a/ios/chrome/browser/ui/native_content_controller.mm b/ios/chrome/browser/ui/native_content_controller.mm
new file mode 100644
index 0000000000000000000000000000000000000000..0d40cfc0f68bbe63979ef686cd87918a6529e38b
--- /dev/null
+++ b/ios/chrome/browser/ui/native_content_controller.mm
@@ -0,0 +1,60 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/browser/ui/native_content_controller.h"
+
+#import <UIKit/UIKit.h>
+
+#include "base/mac/bundle_locations.h"
+#import "base/mac/foundation_util.h"
+#include "base/mac/objc_property_releaser.h"
+
+@implementation NativeContentController {
+ base::mac::ObjCPropertyReleaser _propertyReleaser_NativeContentController;
+}
+
+@synthesize view = _view;
+@synthesize title = _title;
+@synthesize url = _url;
+
+- (instancetype)initWithNibName:(NSString*)nibName url:(const GURL&)url {
+ self = [super init];
+ if (self) {
+ _propertyReleaser_NativeContentController.Init(
+ self, [NativeContentController class]);
+ [base::mac::FrameworkBundle() loadNibNamed:nibName owner:self options:nil];
+ _url = url;
+ }
+ return self;
+}
+
+- (instancetype)initWithURL:(const GURL&)url {
+ self = [super init];
+ if (self) {
+ _propertyReleaser_NativeContentController.Init(
+ self, [NativeContentController class]);
+ _url = url;
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [_view removeFromSuperview];
+ [super dealloc];
+}
+
+- (void)handleLowMemory {
+ // TODO(pinkerton): What should this do? Toss the view?
+}
+
+- (BOOL)isViewAlive {
+ // TODO(pinkerton): See handleLowMemory above.
+ return YES;
+}
+
+- (void)reload {
+ // Not implemented in base class.
+}
+
+@end
« 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