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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 508313002: mac: Add traffic lights to fullscreen mode in Yosemite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_fullscreen2
Patch Set: Created 6 years, 4 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/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 9cff4d3304f650f1e7bb99fd543d5ca915ab33cc..bd25bfd2d6386e1409485f7c3072fc74d869d8e9 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -339,9 +339,21 @@ willPositionSheet:(NSWindow*)sheet
maxY -= tabStripHeight;
[tabStripView setFrame:NSMakeRect(0, maxY, width, tabStripHeight)];
+ // In Yosemite fullscreen, manually add the fullscreen controls to the tab
+ // strip.
+ BOOL addControlsInFullscreen =
+ [self isInOrEnteringAppKitFullscreen] && base::mac::IsOSYosemiteOrLater();
+
// Set left indentation based on fullscreen mode status.
- [tabStripController_ setLeftIndentForControls:(fullscreen ? 0 :
- [[tabStripController_ class] defaultLeftIndentForControls])];
+ CGFloat leftIndent = 0;
+ if (!fullscreen || addControlsInFullscreen)
+ leftIndent = [[tabStripController_ class] defaultLeftIndentForControls];
+ [tabStripController_ setLeftIndentForControls:leftIndent];
+
+ if (addControlsInFullscreen)
+ [tabStripController_ addWindowControls];
+ else
+ [tabStripController_ removeWindowControls];
// Lay out the icognito/avatar badge because calculating the indentation on
// the right depends on it.

Powered by Google App Engine
This is Rietveld 408576698