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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm

Issue 8477042: Move Sad Tab implementation out of the TabContentsViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE saves my butt again Created 9 years, 1 month 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: 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..35005a3e1cf8cfefa124472354ead4908e5748e5 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,21 @@
#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];
+}
jochen (gone - plz use gerrit) 2011/11/14 16:44:54 empty line after this
+gfx::NativeView ViewOfSadTabController(SadTabController* sad_tab) {
+ return [sad_tab view];
+}
+}
jochen (gone - plz use gerrit) 2011/11/14 16:44:54 // 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 +35,6 @@
}
}
-- (void)dealloc {
- [[self view] removeFromSuperview];
- [super dealloc];
-}
-
- (TabContents*)tabContents {
return tabContents_;
}

Powered by Google App Engine
This is Rietveld 408576698