| 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 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1897 return !exitingAppKitFullscreen_ && | 1897 return !exitingAppKitFullscreen_ && |
| 1898 (([[self window] styleMask] & NSFullScreenWindowMask) == | 1898 (([[self window] styleMask] & NSFullScreenWindowMask) == |
| 1899 NSFullScreenWindowMask || | 1899 NSFullScreenWindowMask || |
| 1900 enteringAppKitFullscreen_); | 1900 enteringAppKitFullscreen_); |
| 1901 } | 1901 } |
| 1902 | 1902 |
| 1903 - (CGFloat)menubarOffset { | 1903 - (CGFloat)menubarOffset { |
| 1904 return [presentationModeController_ menubarOffset]; | 1904 return [presentationModeController_ menubarOffset]; |
| 1905 } | 1905 } |
| 1906 | 1906 |
| 1907 - (NSView*)avatarView { |
| 1908 return [avatarButtonController_ view]; |
| 1909 } |
| 1910 |
| 1907 - (void)enterWebContentFullscreen { | 1911 - (void)enterWebContentFullscreen { |
| 1908 // HTML5 Fullscreen should only use AppKit fullscreen in 10.10+. | 1912 // HTML5 Fullscreen should only use AppKit fullscreen in 10.10+. |
| 1909 // However, if the user is using multiple monitors and turned off | 1913 // However, if the user is using multiple monitors and turned off |
| 1910 // "Separate Space in Each Display", use Immersive Fullscreen so | 1914 // "Separate Space in Each Display", use Immersive Fullscreen so |
| 1911 // that the other monitors won't blank out. | 1915 // that the other monitors won't blank out. |
| 1912 display::Screen* screen = display::Screen::GetScreen(); | 1916 display::Screen* screen = display::Screen::GetScreen(); |
| 1913 BOOL hasMultipleMonitors = screen && screen->GetNumDisplays() > 1; | 1917 BOOL hasMultipleMonitors = screen && screen->GetNumDisplays() > 1; |
| 1914 if (base::mac::IsOSYosemiteOrLater() && | 1918 if (base::mac::IsOSYosemiteOrLater() && |
| 1915 !(hasMultipleMonitors && ![NSScreen screensHaveSeparateSpaces])) { | 1919 !(hasMultipleMonitors && ![NSScreen screensHaveSeparateSpaces])) { |
| 1916 [self enterAppKitFullscreen]; | 1920 [self enterAppKitFullscreen]; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2024 | 2028 |
| 2025 - (NSRect)savedRegularWindowFrame { | 2029 - (NSRect)savedRegularWindowFrame { |
| 2026 return savedRegularWindowFrame_; | 2030 return savedRegularWindowFrame_; |
| 2027 } | 2031 } |
| 2028 | 2032 |
| 2029 - (BOOL)isFullscreenTransitionInProgress { | 2033 - (BOOL)isFullscreenTransitionInProgress { |
| 2030 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; | 2034 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; |
| 2031 } | 2035 } |
| 2032 | 2036 |
| 2033 @end // @implementation BrowserWindowController(WindowType) | 2037 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |