Chromium Code Reviews| Index: chrome/browser/cocoa/tab_window_controller.mm |
| =================================================================== |
| --- chrome/browser/cocoa/tab_window_controller.mm (revision 19669) |
| +++ chrome/browser/cocoa/tab_window_controller.mm (working copy) |
| @@ -16,12 +16,18 @@ |
| @synthesize tabContentArea = tabContentArea_; |
| - (void)windowDidLoad { |
| - // Place the tab bar above the content box and add it to the view hierarchy |
| - // as a sibling of the content view so it can overlap with the window frame. |
| - NSRect tabFrame = [tabContentArea_ frame]; |
| - tabFrame.origin = NSMakePoint(0, NSMaxY(tabFrame)); |
| - tabFrame.size.height = NSHeight([tabStripView_ frame]); |
| - [tabStripView_ setFrame:tabFrame]; |
| + // TODO(jrg): a non-normal window (e.g. for pop-ups) needs more work |
| + // than just removal of the tab strip offset. But this is enough to |
| + // avoid confusion (e.g. "new tab" on popup gets created in a |
| + // different window). |
|
pink (ping after 24hrs)
2009/07/01 12:53:00
does the content area need adjusting up? I think i
John Grabowski
2009/07/02 20:28:25
Yes, it is too low. The right answer is a new nib
|
| + if ([self isNormalWindow]) { |
| + // Place the tab bar above the content box and add it to the view hierarchy |
| + // as a sibling of the content view so it can overlap with the window frame. |
| + NSRect tabFrame = [tabContentArea_ frame]; |
| + tabFrame.origin = NSMakePoint(0, NSMaxY(tabFrame)); |
| + tabFrame.size.height = NSHeight([tabStripView_ frame]); |
| + [tabStripView_ setFrame:tabFrame]; |
| + } |
| [[[[self window] contentView] superview] addSubview:tabStripView_]; |
| } |
| @@ -156,4 +162,10 @@ |
| return @""; |
| } |
| +- (BOOL)isNormalWindow { |
| + // subclass must implement |
| + NOTIMPLEMENTED(); |
| + return YES; |
| +} |
| + |
| @end |