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..283bd5ccb7942a3ee764c9d74997f07f40bd0941 |
--- /dev/null |
+++ b/ios/chrome/browser/ui/native_content_controller.mm |
@@ -0,0 +1,54 @@ |
+// 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. |
+ |
+#include "base/mac/bundle_locations.h" |
+#import "base/mac/foundation_util.h" |
+#import "ios/chrome/browser/ui/native_content_controller.h" |
+ |
+@implementation 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 |