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