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

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

Issue 1732173004: Revert to Immersive Fullscreen on OSX for a special case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 9c2e44caec95387216fae9443df51c1b6bf20216..5821448fb1777c725dc60c067531448a36030d0e 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -100,6 +100,7 @@
#include "ui/base/l10n/l10n_util_mac.h"
#import "ui/gfx/mac/coordinate_conversion.h"
#include "ui/gfx/mac/scoped_cocoa_disable_screen_updates.h"
+#include "ui/gfx/screen.h"
using bookmarks::BookmarkModel;
using bookmarks::BookmarkNode;
@@ -2026,11 +2027,18 @@ willAnimateFromState:(BookmarkBar::State)oldState
- (void)enterWebContentFullscreenForURL:(const GURL&)url
bubbleType:(ExclusiveAccessBubbleType)bubbleType {
// HTML5 Fullscreen should only use AppKit fullscreen in 10.10+.
+ // However, if the user is using multiple monitors and turned off
+ // "Separate Space in Each Display", use Immersive Fullscreen so
+ // that the other monitors won't blank out.
+ gfx::Screen* screen = gfx::Screen::GetScreen();
+ BOOL hasMultipleMonitors = screen && screen->GetNumDisplays() > 1;
if (chrome::mac::SupportsSystemFullscreen() &&
- base::mac::IsOSYosemiteOrLater())
+ base::mac::IsOSYosemiteOrLater() &&
+ !(hasMultipleMonitors && ![NSScreen screensHaveSeparateSpaces])) {
[self enterAppKitFullscreen];
- else
+ } else {
[self enterImmersiveFullscreen];
+ }
if (!url.is_empty())
[self updateFullscreenExitBubbleURL:url bubbleType:bubbleType];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698