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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 1725643002: Revert to Immersive Fullscreen on OSX for a multimonitors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 if (chrome::mac::SupportsSystemFullscreen()) { 2009 if (chrome::mac::SupportsSystemFullscreen()) {
2010 [self enterBrowserFullscreenWithToolbar:NO]; 2010 [self enterBrowserFullscreenWithToolbar:NO];
2011 } else { 2011 } else {
2012 [self enterImmersiveFullscreen]; 2012 [self enterImmersiveFullscreen];
2013 DCHECK(!exclusiveAccessController_->url().is_empty()); 2013 DCHECK(!exclusiveAccessController_->url().is_empty());
2014 [self updateFullscreenExitBubble]; 2014 [self updateFullscreenExitBubble];
2015 } 2015 }
2016 } 2016 }
2017 2017
2018 - (void)enterWebContentFullscreen { 2018 - (void)enterWebContentFullscreen {
2019 BOOL hasMultipleMonitors = [[NSScreen screens] count] > 1;
Avi (use Gerrit) 2016/02/23 20:15:59 Does this trigger with mirrored displays? Do we wa
spqchan 2016/02/23 21:27:59 Good point on the mirrored displays. This should t
2020
2019 // HTML5 Fullscreen should only use AppKit fullscreen in 10.10+. 2021 // HTML5 Fullscreen should only use AppKit fullscreen in 10.10+.
2022 // However, if the user is using multiple monitors and turned off
2023 // "Separate Space in Each Display", use Immersive Fullscreen so
2024 // that the other monitors won't blank out.
2020 if (chrome::mac::SupportsSystemFullscreen() && 2025 if (chrome::mac::SupportsSystemFullscreen() &&
2021 base::mac::IsOSYosemiteOrLater()) 2026 base::mac::IsOSYosemiteOrLater() &&
2027 !(hasMultipleMonitors && ![NSScreen screensHaveSeparateSpaces]))
Avi (use Gerrit) 2016/02/23 20:15:59 This if() needs {}s because the condition has mult
spqchan 2016/02/23 21:27:58 Done.
2022 [self enterAppKitFullscreen]; 2028 [self enterAppKitFullscreen];
2023 else 2029 else
2024 [self enterImmersiveFullscreen]; 2030 [self enterImmersiveFullscreen];
2025 2031
2026 if (!exclusiveAccessController_->url().is_empty()) 2032 if (!exclusiveAccessController_->url().is_empty())
2027 [self updateFullscreenExitBubble]; 2033 [self updateFullscreenExitBubble];
2028 } 2034 }
2029 2035
2030 - (void)exitAnyFullscreen { 2036 - (void)exitAnyFullscreen {
2031 // TODO(erikchen): Fullscreen modes should stack. Should be able to exit 2037 // TODO(erikchen): Fullscreen modes should stack. Should be able to exit
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 2131
2126 - (BOOL)supportsBookmarkBar { 2132 - (BOOL)supportsBookmarkBar {
2127 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2133 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2128 } 2134 }
2129 2135
2130 - (BOOL)isTabbedWindow { 2136 - (BOOL)isTabbedWindow {
2131 return browser_->is_type_tabbed(); 2137 return browser_->is_type_tabbed();
2132 } 2138 }
2133 2139
2134 @end // @implementation BrowserWindowController(WindowType) 2140 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« 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