OLD | NEW |
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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1927 return [avatarButtonController_ view]; | 1927 return [avatarButtonController_ view]; |
1928 } | 1928 } |
1929 | 1929 |
1930 - (void)enterWebContentFullscreen { | 1930 - (void)enterWebContentFullscreen { |
1931 // HTML5 Fullscreen should only use AppKit fullscreen in 10.10+. | 1931 // HTML5 Fullscreen should only use AppKit fullscreen in 10.10+. |
1932 // However, if the user is using multiple monitors and turned off | 1932 // However, if the user is using multiple monitors and turned off |
1933 // "Separate Space in Each Display", use Immersive Fullscreen so | 1933 // "Separate Space in Each Display", use Immersive Fullscreen so |
1934 // that the other monitors won't blank out. | 1934 // that the other monitors won't blank out. |
1935 display::Screen* screen = display::Screen::GetScreen(); | 1935 display::Screen* screen = display::Screen::GetScreen(); |
1936 BOOL hasMultipleMonitors = screen && screen->GetNumDisplays() > 1; | 1936 BOOL hasMultipleMonitors = screen && screen->GetNumDisplays() > 1; |
1937 if (base::mac::IsOSYosemiteOrLater() && | 1937 if (base::mac::IsAtLeastOS10_10() && |
1938 !(hasMultipleMonitors && ![NSScreen screensHaveSeparateSpaces])) { | 1938 !(hasMultipleMonitors && ![NSScreen screensHaveSeparateSpaces])) { |
1939 [self enterAppKitFullscreen]; | 1939 [self enterAppKitFullscreen]; |
1940 } else { | 1940 } else { |
1941 [self enterImmersiveFullscreen]; | 1941 [self enterImmersiveFullscreen]; |
1942 } | 1942 } |
1943 | 1943 |
1944 if (!exclusiveAccessController_->url().is_empty()) | 1944 if (!exclusiveAccessController_->url().is_empty()) |
1945 [self updateFullscreenExitBubble]; | 1945 [self updateFullscreenExitBubble]; |
1946 } | 1946 } |
1947 | 1947 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 | 2043 |
2044 - (NSRect)savedRegularWindowFrame { | 2044 - (NSRect)savedRegularWindowFrame { |
2045 return savedRegularWindowFrame_; | 2045 return savedRegularWindowFrame_; |
2046 } | 2046 } |
2047 | 2047 |
2048 - (BOOL)isFullscreenTransitionInProgress { | 2048 - (BOOL)isFullscreenTransitionInProgress { |
2049 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; | 2049 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; |
2050 } | 2050 } |
2051 | 2051 |
2052 @end // @implementation BrowserWindowController(WindowType) | 2052 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |