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

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

Issue 611453004: Mac: Fix theme image drawing when building with >=10.9 SDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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/ui/cocoa/tabs/tab_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
index 103c740d49970350b4a33c23d30aee692021056e..6f03ffdeb473f79fe0dec7bbf6b364ae1900a253 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
@@ -8,6 +8,7 @@
#import "chrome/browser/ui/cocoa/browser_window_layout.h"
#import "chrome/browser/ui/cocoa/fast_resize_view.h"
#import "chrome/browser/ui/cocoa/framed_browser_window.h"
+#import "chrome/browser/ui/cocoa/tabs/tab_strip_background_view.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
#import "chrome/browser/ui/cocoa/version_independent_window.h"
@@ -65,6 +66,23 @@
NSViewHeightSizable];
[[[self window] contentView] addSubview:tabContentArea_];
+ // tabStripBackgroundView_ draws the theme image behind the tab strip area.
+ // When making a tab dragging window (setUseOverlay:), this view stays in
+ // the parent window so that it can be translucent, while the tab strip view
+ // moves to the child window and stays opaque.
+ NSView* windowView = [window cr_windowView];
+ tabStripBackgroundView_.reset([[TabStripBackgroundView alloc]
erikchen 2014/09/27 00:23:33 When the tab strip gets moved to another window (e
Andre 2014/09/27 18:17:02 I don't think this view needs to be moved. Fullscr
+ initWithFrame:NSMakeRect(0,
+ NSMaxY([windowView bounds]) -
+ kBrowserFrameViewPaintHeight,
+ NSWidth([windowView bounds]),
+ kBrowserFrameViewPaintHeight)]);
+ [tabStripBackgroundView_
+ setAutoresizingMask:NSViewWidthSizable | NSViewMinYMargin];
+ [windowView addSubview:tabStripBackgroundView_
+ positioned:NSWindowBelow
+ relativeTo:nil];
+
tabStripView_.reset([[TabStripView alloc]
initWithFrame:NSMakeRect(0, 0, 750, chrome::kTabStripHeight)]);
[tabStripView_ setAutoresizingMask:NSViewWidthSizable |

Powered by Google App Engine
This is Rietveld 408576698