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

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: Rebase error. 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/tab_strip_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aff989b80de903db37432800a806beb4eef00a38..6ffb2ca5ebe248c5932e4db0a79fea4b9b7a256d 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -333,9 +333,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 isInAppKitFullscreen] && 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.
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698