Index: chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm |
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm |
index c01a9458f809d86c29d4c8a85d9dcaae154db167..5812a8c3c00890b48f4fbcaa9b6321d5301fd3d2 100644 |
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm |
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm |
@@ -7,17 +7,24 @@ |
#include "base/mac/mac_util.h" |
#import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h" |
+namespace sad_tab_controller_mac { |
+ |
+SadTabController* CreateSadTabController(TabContents* tab_contents) { |
+ return [[SadTabController alloc] initWithTabContents:tab_contents]; |
+} |
+ |
+gfx::NativeView GetViewOfSadTabController(SadTabController* sad_tab) { |
+ return [sad_tab view]; |
+} |
+ |
+} // namespace sad_tab_controller_mac |
+ |
@implementation SadTabController |
-- (id)initWithTabContents:(TabContents*)someTabContents |
- superview:(NSView*)superview { |
+- (id)initWithTabContents:(TabContents*)tabContents { |
if ((self = [super initWithNibName:@"SadTab" |
bundle:base::mac::MainAppBundle()])) { |
- tabContents_ = someTabContents; |
- |
- NSView* view = [self view]; |
- [superview addSubview:view]; |
- [view setFrame:[superview bounds]]; |
+ tabContents_ = tabContents; |
} |
return self; |
@@ -31,11 +38,6 @@ |
} |
} |
-- (void)dealloc { |
- [[self view] removeFromSuperview]; |
- [super dealloc]; |
-} |
- |
- (TabContents*)tabContents { |
return tabContents_; |
} |