Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm |
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
| index b808efe0a3e394be7a3d60e4629b89293dc61121..5ff28fb136a1c615776a03e00d6b1d4745e5abc9 100644 |
| --- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
| +++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm |
| @@ -455,9 +455,7 @@ willPositionSheet:(NSWindow*)sheet |
| } |
| - (void)configurePresentationModeController { |
| - BOOL fullscreen_for_tab = browser_->exclusive_access_manager() |
| - ->fullscreen_controller() |
| - ->IsWindowFullscreenForTabOrPending(); |
| + BOOL fullscreen_for_tab = [self isFullscreenForTabContent]; |
|
Robert Sesek
2015/12/15 14:57:01
naming: fullscreenForTab (maybe change kioskMode t
|
| BOOL kiosk_mode = |
| base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode); |
| BOOL showDropdown = |
| @@ -717,6 +715,13 @@ willPositionSheet:(NSWindow*)sheet |
| blockLayoutSubviews_ = NO; |
| fullscreenTransition_.reset(); |
| + if ([self isFullscreenForTabContent]) { |
| + NSRect windowFrame = [self window].frame; |
| + NSRect contentViewFrame = |
| + NSMakeRect(0, 0, windowFrame.size.width, windowFrame.size.height); |
| + [self.chromeContentView setFrame:contentViewFrame]; |
| + } |
| + |
| // In Yosemite, some combination of the titlebar and toolbar always show in |
| // full-screen mode. We do not want either to show. Search for the window that |
| // contains the views, and hide it. There is no need to ever unhide the view. |
| @@ -857,9 +862,7 @@ willPositionSheet:(NSWindow*)sheet |
| - (void)adjustUIForEnteringFullscreen { |
| fullscreen_mac::SlidingStyle style; |
| - if (browser_->exclusive_access_manager() |
| - ->fullscreen_controller() |
| - ->IsWindowFullscreenForTabOrPending()) { |
| + if ([self isFullscreenForTabContent]) { |
| style = fullscreen_mac::OMNIBOX_TABS_NONE; |
| } else if (enteringPresentationMode_ || [self shouldHideFullscreenToolbar]) { |
| style = fullscreen_mac::OMNIBOX_TABS_HIDDEN; |
| @@ -1169,6 +1172,13 @@ willPositionSheet:(NSWindow*)sheet |
| if (base::mac::IsOSMavericks() && !enterFullScreen) |
| return NO; |
| + // Temporary disable custom enter animation since it currently breaks the |
| + // fullscreen Flash content. |
| + // TODO(spqchan): Fix the custom animation to enter fullscreen so that it |
| + // will work with Flash content. |
| + if (enterFullScreen && [self isFullscreenForTabContent]) |
| + return NO; |
| + |
| NSView* root = [[self.window contentView] superview]; |
| if (!root.layer) |
| return NO; |
| @@ -1257,4 +1267,10 @@ willPositionSheet:(NSWindow*)sheet |
| return nil; |
| } |
| +- (BOOL)isFullscreenForTabContent { |
| + return browser_->exclusive_access_manager() |
| + ->fullscreen_controller() |
| + ->IsWindowFullscreenForTabOrPending(); |
| +} |
| + |
| @end // @implementation BrowserWindowController(Private) |