Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 481273002: Mac: Fix a recently introduced layering bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase against top of tree. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_private.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 } 670 }
671 if (showDropdown) { 671 if (showDropdown) {
672 // Turn on layered mode for the window's root view for the entry 672 // Turn on layered mode for the window's root view for the entry
673 // animation. Without this, the OS fullscreen animation for entering 673 // animation. Without this, the OS fullscreen animation for entering
674 // fullscreen mode does not correctly draw the tab strip. 674 // fullscreen mode does not correctly draw the tab strip.
675 // It will be turned off (set back to NO) when the animation finishes, 675 // It will be turned off (set back to NO) when the animation finishes,
676 // in -windowDidEnterFullScreen:. 676 // in -windowDidEnterFullScreen:.
677 // Leaving wantsLayer on for the duration of presentation mode causes 677 // Leaving wantsLayer on for the duration of presentation mode causes
678 // performance issues when the dropdown is animated in/out. It also does 678 // performance issues when the dropdown is animated in/out. It also does
679 // not seem to be required for the exit animation. 679 // not seem to be required for the exit animation.
680 windowViewWantsLayer_ = [[[self window] cr_windowView] wantsLayer];
680 [[[self window] cr_windowView] setWantsLayer:YES]; 681 [[[self window] cr_windowView] setWantsLayer:YES];
681 } 682 }
682 NSView* contentView = [[self window] contentView]; 683 NSView* contentView = [[self window] contentView];
683 [presentationModeController_ enterPresentationModeForContentView:contentView 684 [presentationModeController_ enterPresentationModeForContentView:contentView
684 showDropdown:showDropdown]; 685 showDropdown:showDropdown];
685 } else { 686 } else {
686 [presentationModeController_ exitPresentationMode]; 687 [presentationModeController_ exitPresentationMode];
687 presentationModeController_.reset(); 688 presentationModeController_.reset();
688 } 689 }
689 690
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 908
908 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 909 const CommandLine* command_line = CommandLine::ForCurrentProcess();
909 if (command_line->HasSwitch(switches::kEnableSimplifiedFullscreen) && 910 if (command_line->HasSwitch(switches::kEnableSimplifiedFullscreen) &&
910 fullscreenUrl_.is_empty()) { 911 fullscreenUrl_.is_empty()) {
911 fullscreenModeController_.reset([[FullscreenModeController alloc] 912 fullscreenModeController_.reset([[FullscreenModeController alloc]
912 initWithBrowserWindowController:self]); 913 initWithBrowserWindowController:self]);
913 } 914 }
914 915
915 [self showFullscreenExitBubbleIfNecessary]; 916 [self showFullscreenExitBubbleIfNecessary];
916 browser_->WindowFullscreenStateChanged(); 917 browser_->WindowFullscreenStateChanged();
917 [[[self window] cr_windowView] setWantsLayer:NO]; 918 [[[self window] cr_windowView] setWantsLayer:windowViewWantsLayer_];
918 [self updateRoundedBottomCorners]; 919 [self updateRoundedBottomCorners];
919 } 920 }
920 921
921 - (void)windowWillExitFullScreen:(NSNotification*)notification { 922 - (void)windowWillExitFullScreen:(NSNotification*)notification {
922 if (notification) // For System Fullscreen when non-nil. 923 if (notification) // For System Fullscreen when non-nil.
923 [self registerForContentViewResizeNotifications]; 924 [self registerForContentViewResizeNotifications];
924 fullscreenModeController_.reset(); 925 fullscreenModeController_.reset();
925 [self destroyFullscreenExitBubbleIfNecessary]; 926 [self destroyFullscreenExitBubbleIfNecessary];
926 [self setPresentationModeInternal:NO forceDropdown:NO]; 927 [self setPresentationModeInternal:NO forceDropdown:NO];
927 } 928 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 } 1046 }
1046 } 1047 }
1047 1048
1048 - (void)updateInfoBarTipVisibility { 1049 - (void)updateInfoBarTipVisibility {
1049 // If there's no toolbar then hide the infobar tip. 1050 // If there's no toolbar then hide the infobar tip.
1050 [infoBarContainerController_ 1051 [infoBarContainerController_
1051 setShouldSuppressTopInfoBarTip:![self hasToolbar]]; 1052 setShouldSuppressTopInfoBarTip:![self hasToolbar]];
1052 } 1053 }
1053 1054
1054 @end // @implementation BrowserWindowController(Private) 1055 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698