summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_view.mm
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 15:33:43 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 15:33:43 +0000
commit1224685915d0687e3dad2e855161693da41122c5 (patch)
treed81b0d15fe62770b8b98a95df39721beb82d9219 /chrome/browser/cocoa/tab_view.mm
parentbd14784bcadf8cf55ae92e713a2545245bb02826 (diff)
downloadchromium_src-1224685915d0687e3dad2e855161693da41122c5.zip
chromium_src-1224685915d0687e3dad2e855161693da41122c5.tar.gz
chromium_src-1224685915d0687e3dad2e855161693da41122c5.tar.bz2
Re-land r43741 - broke browser_tests.
[Mac] Make Mac phantom tabs match the appearance of the other platforms. BUG=none TEST=Open a new tab, navigate, and pin it. Open a new tab. Close the pinned tab. No tab background should be drawn, just the favicon. Review URL: http://codereview.chromium.org/1632007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_view.mm')
-rw-r--r--chrome/browser/cocoa/tab_view.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm
index b403f74..8873727 100644
--- a/chrome/browser/cocoa/tab_view.mm
+++ b/chrome/browser/cocoa/tab_view.mm
@@ -599,6 +599,11 @@ const CGFloat kRapidCloseDist = 2.5;
}
- (void)drawRect:(NSRect)rect {
+ // If this tab is phantom, do not draw the tab background itself. The only UI
+ // element that will represent this tab is the favicon.
+ if ([controller_ phantom])
+ return;
+
NSGraphicsContext* context = [NSGraphicsContext currentContext];
[context saveGraphicsState];
rect = [self bounds];
@@ -863,6 +868,14 @@ const CGFloat kRapidCloseDist = 2.5;
@end // @implementation TabView
+@implementation TabView (TabControllerInterface)
+
+- (void)setController:(TabController*)controller {
+ controller_ = controller;
+}
+
+@end // @implementation TabView (TabControllerInterface)
+
@implementation TabView(Private)
- (void)resetLastGlowUpdateTime {