| Index: chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm b/chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm
|
| index 43d28e1a25f315d7a26df76d7a43175453f67943..2855e87e91def96915e21aa82b3c0eceb4f9c9e3 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm
|
| @@ -54,6 +54,40 @@
|
|
|
| } // namespace
|
|
|
| +// This view draws a dummy toolbar over the resized content view during
|
| +// the exit fullscreen animation. It is removed at the end of the animation.
|
| +@interface FullscreenTabStripBackgroundView : NSView {
|
| + base::scoped_nsobject<NSColor> windowBackgroundColor_;
|
| +}
|
| +
|
| +- (instancetype)initWithFrame:(NSRect)frame background:(NSColor*)color;
|
| +
|
| +@end
|
| +
|
| +@implementation FullscreenTabStripBackgroundView
|
| +
|
| +- (instancetype)initWithFrame:(NSRect)frame background:(NSColor*)color {
|
| + if ((self = [super initWithFrame:frame])) {
|
| + windowBackgroundColor_.reset([color copy]);
|
| + }
|
| + return self;
|
| +}
|
| +
|
| +// Override this method so that we can paint the toolbar in this view.
|
| +// This method first fill itself with the toolbar's background. After that,
|
| +// it will paint the window's theme if applicable.
|
| +- (void)drawRect:(NSRect)frame {
|
| + [windowBackgroundColor_ set];
|
| + NSRectFillUsingOperation(frame, NSCompositeDestinationOver);
|
| +
|
| + [FramedBrowserWindow drawWindowThemeInDirtyRect:frame
|
| + forView:self
|
| + bounds:[self bounds]
|
| + forceBlackBackground:NO];
|
| +}
|
| +
|
| +@end
|
| +
|
| @interface BrowserWindowFullscreenTransition ()
|
| <CAAnimationDelegate, CALayerDelegate> {
|
| // Flag to keep track of whether we are entering or exiting fullscreen.
|
| @@ -100,7 +134,7 @@
|
| NSRect finalFrame_;
|
|
|
| // This view draws the tabstrip background during the exit animation.
|
| - base::scoped_nsobject<TabStripBackgroundView>
|
| + base::scoped_nsobject<FullscreenTabStripBackgroundView>
|
| fullscreenTabStripBackgroundView_;
|
|
|
| // Locks and unlocks the FullSizeContentWindow.
|
| @@ -328,7 +362,9 @@
|
| [primaryWindow_ forceContentViewFrame:relativeContentFinalFrame];
|
|
|
| fullscreenTabStripBackgroundView_.reset(
|
| - [[TabStripBackgroundView alloc] initWithFrame:finalFrame_]);
|
| + [[FullscreenTabStripBackgroundView alloc]
|
| + initWithFrame:finalFrame_
|
| + background:primaryWindowInitialBackgroundColor_]);
|
| [fullscreenTabStripBackgroundView_ setFrameOrigin:NSZeroPoint];
|
| [contentView addSubview:fullscreenTabStripBackgroundView_.get()
|
| positioned:NSWindowBelow
|
|
|