OLD | NEW |
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 Loading... |
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 Loading... |
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) |
OLD | NEW |