| 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 5362f8c0deb840c1f7715c49e90928f0b017112a..14a8e6a3504954ee88ba5be97e1c972eef5a3008 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
|
| @@ -453,13 +453,11 @@ willPositionSheet:(NSWindow*)sheet
|
| }
|
|
|
| - (void)configurePresentationModeController {
|
| - BOOL fullscreen_for_tab = browser_->exclusive_access_manager()
|
| - ->fullscreen_controller()
|
| - ->IsWindowFullscreenForTabOrPending();
|
| - BOOL kiosk_mode =
|
| + BOOL fullscreenForTab = [self isFullscreenForTabContent];
|
| + BOOL kioskMode =
|
| base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode);
|
| BOOL showDropdown =
|
| - !fullscreen_for_tab && !kiosk_mode && ([self floatingBarHasFocus]);
|
| + !fullscreenForTab && !kioskMode && ([self floatingBarHasFocus]);
|
|
|
| PermissionBubbleManager* manager = [self permissionBubbleManager];
|
| if (manager && manager->IsBubbleVisible()) {
|
| @@ -715,6 +713,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.
|
| @@ -855,9 +860,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_) {
|
| style = fullscreen_mac::OMNIBOX_TABS_HIDDEN;
|
| @@ -1167,6 +1170,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;
|
| @@ -1255,4 +1265,10 @@ willPositionSheet:(NSWindow*)sheet
|
| return nil;
|
| }
|
|
|
| +- (BOOL)isFullscreenForTabContent {
|
| + return browser_->exclusive_access_manager()
|
| + ->fullscreen_controller()
|
| + ->IsWindowFullscreenForTabOrPending();
|
| +}
|
| +
|
| @end // @implementation BrowserWindowController(Private)
|
|
|