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

Unified Diff: chrome/browser/cocoa/tab_window_controller.mm

Issue 151135: Pop-up chrome.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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: 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
« chrome/browser/cocoa/tab_window_controller.h ('K') | « chrome/browser/cocoa/tab_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698