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

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

Issue 905803002: Fix log spam on 10.6 due to NSWindowFullScreenButton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | 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/bind_objc_block.h" 10 #include "base/mac/bind_objc_block.h"
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 835
836 [layout setInAnyFullscreen:[self isInAnyFullscreenMode]]; 836 [layout setInAnyFullscreen:[self isInAnyFullscreenMode]];
837 [layout setFullscreenSlidingStyle: 837 [layout setFullscreenSlidingStyle:
838 presentationModeController_.get().slidingStyle]; 838 presentationModeController_.get().slidingStyle];
839 [layout setFullscreenMenubarOffset: 839 [layout setFullscreenMenubarOffset:
840 [presentationModeController_ menubarOffset]]; 840 [presentationModeController_ menubarOffset]];
841 [layout setFullscreenToolbarFraction: 841 [layout setFullscreenToolbarFraction:
842 [presentationModeController_ toolbarFraction]]; 842 [presentationModeController_ toolbarFraction]];
843 843
844 [layout setHasTabStrip:[self hasTabStrip]]; 844 [layout setHasTabStrip:[self hasTabStrip]];
845 NSButton* fullScreenButton = 845 // NSWindowFullScreenButton is 10.7+ and results in log spam on 10.6 if used.
846 [[self window] standardWindowButton:NSWindowFullScreenButton]; 846 NSButton* fullScreenButton = base::mac::IsOSSnowLeopard() ?
847 nil : [[self window] standardWindowButton:NSWindowFullScreenButton];
847 [layout setFullscreenButtonFrame:fullScreenButton ? [fullScreenButton frame] 848 [layout setFullscreenButtonFrame:fullScreenButton ? [fullScreenButton frame]
848 : NSZeroRect]; 849 : NSZeroRect];
849 if ([self shouldShowAvatar]) { 850 if ([self shouldShowAvatar]) {
850 NSView* avatar = [avatarButtonController_ view]; 851 NSView* avatar = [avatarButtonController_ view];
851 [layout setShouldShowAvatar:YES]; 852 [layout setShouldShowAvatar:YES];
852 [layout setShouldUseNewAvatar:[self shouldUseNewAvatarButton]]; 853 [layout setShouldUseNewAvatar:[self shouldUseNewAvatarButton]];
853 [layout setAvatarSize:[avatar frame].size]; 854 [layout setAvatarSize:[avatar frame].size];
854 [layout setAvatarLineWidth:[[avatar superview] cr_lineWidth]]; 855 [layout setAvatarLineWidth:[[avatar superview] cr_lineWidth]];
855 } 856 }
856 857
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 } 1064 }
1064 1065
1065 - (BOOL)shouldConstrainFrameRect { 1066 - (BOOL)shouldConstrainFrameRect {
1066 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained]) 1067 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained])
1067 return NO; 1068 return NO;
1068 1069
1069 return [super shouldConstrainFrameRect]; 1070 return [super shouldConstrainFrameRect];
1070 } 1071 }
1071 1072
1072 @end // @implementation BrowserWindowController(Private) 1073 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698