| 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 b515194acba1aea5c4fb205751fa6489bc1ec73b..fed040023f770974fa5c699f72bc18f871a2c9d0 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
|
| @@ -778,6 +778,15 @@ willPositionSheet:(NSWindow*)sheet
|
| - (void)windowDidExitFullScreen:(NSNotification*)notification {
|
| DCHECK(exitingAppKitFullscreen_);
|
|
|
| + // If the custom transition isn't complete, then just set the flag and
|
| + // return. Once the transition is completed, windowDidExitFullscreen will
|
| + // be called again.
|
| + if (isUsingCustomAnimation_ &&
|
| + ![fullscreenTransition_ isTransitionCompleted]) {
|
| + appKitDidExitFullscreen_ = YES;
|
| + return;
|
| + }
|
| +
|
| if (notification) // For System Fullscreen when non-nil.
|
| [self deregisterForContentViewResizeNotifications];
|
|
|
| @@ -1176,10 +1185,8 @@ willPositionSheet:(NSWindow*)sheet
|
| if (![self shouldUseCustomAppKitFullscreenTransition:YES])
|
| return nil;
|
|
|
| - FramedBrowserWindow* framedBrowserWindow =
|
| - base::mac::ObjCCast<FramedBrowserWindow>([self window]);
|
| - fullscreenTransition_.reset([[BrowserWindowFullscreenTransition alloc]
|
| - initEnterWithWindow:framedBrowserWindow]);
|
| + fullscreenTransition_.reset(
|
| + [[BrowserWindowFullscreenTransition alloc] initEnterWithController:self]);
|
|
|
| NSArray* customWindows =
|
| [fullscreenTransition_ customWindowsForFullScreenTransition];
|
| @@ -1193,12 +1200,8 @@ willPositionSheet:(NSWindow*)sheet
|
| if (![self shouldUseCustomAppKitFullscreenTransition:NO])
|
| return nil;
|
|
|
| - FramedBrowserWindow* framedBrowserWindow =
|
| - base::mac::ObjCCast<FramedBrowserWindow>([self window]);
|
| - fullscreenTransition_.reset([[BrowserWindowFullscreenTransition alloc]
|
| - initExitWithWindow:framedBrowserWindow
|
| - frame:savedRegularWindowFrame_
|
| - tabStripBackgroundView:[self tabStripBackgroundView]]);
|
| + fullscreenTransition_.reset(
|
| + [[BrowserWindowFullscreenTransition alloc] initExitWithController:self]);
|
|
|
| NSArray* customWindows =
|
| [fullscreenTransition_ customWindowsForFullScreenTransition];
|
|
|