Commit 34f8293d authored by asvitkine's avatar asvitkine Committed by Commit bot

Fix log spam on 10.6 due to NSWindowFullScreenButton.

NSWindowFullScreenButton is a 10.7 addition and calling
-standardWindowButton: with it on 10.6 results in log
spam of the form:

"unrecognized button type 7"

BUG=none

Review URL: https://codereview.chromium.org/905803002

Cr-Commit-Position: refs/heads/master@{#315089}
parent 2d2ac36e
......@@ -845,8 +845,9 @@ willPositionSheet:(NSWindow*)sheet
[presentationModeController_ toolbarFraction]];
[layout setHasTabStrip:[self hasTabStrip]];
NSButton* fullScreenButton =
[[self window] standardWindowButton:NSWindowFullScreenButton];
// NSWindowFullScreenButton is 10.7+ and results in log spam on 10.6 if used.
NSButton* fullScreenButton = base::mac::IsOSSnowLeopard() ?
nil : [[self window] standardWindowButton:NSWindowFullScreenButton];
[layout setFullscreenButtonFrame:fullScreenButton ? [fullScreenButton frame]
: NSZeroRect];
if ([self shouldShowAvatar]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment