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

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

Issue 1849343003: mac: Remove IsOSSnowLeopard(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
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 #import "base/auto_reset.h" 9 #import "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 914
915 - (void)exitAppKitFullscreen { 915 - (void)exitAppKitFullscreen {
916 DCHECK(base::mac::IsOSLionOrLater()); 916 DCHECK(base::mac::IsOSLionOrLater());
917 if (FramedBrowserWindow* framedBrowserWindow = 917 if (FramedBrowserWindow* framedBrowserWindow =
918 base::mac::ObjCCast<FramedBrowserWindow>([self window])) { 918 base::mac::ObjCCast<FramedBrowserWindow>([self window])) {
919 [framedBrowserWindow toggleSystemFullScreen]; 919 [framedBrowserWindow toggleSystemFullScreen];
920 } 920 }
921 } 921 }
922 922
923 - (NSRect)fullscreenButtonFrame { 923 - (NSRect)fullscreenButtonFrame {
924 // NSWindowFullScreenButton is 10.7+ and results in log spam on 10.6 if used.
925 if (base::mac::IsOSSnowLeopard())
926 return NSZeroRect;
927
928 NSButton* fullscreenButton = 924 NSButton* fullscreenButton =
929 [[self window] standardWindowButton:NSWindowFullScreenButton]; 925 [[self window] standardWindowButton:NSWindowFullScreenButton];
930 if (!fullscreenButton) 926 if (!fullscreenButton)
931 return NSZeroRect; 927 return NSZeroRect;
932 928
933 NSRect buttonFrame = [fullscreenButton frame]; 929 NSRect buttonFrame = [fullscreenButton frame];
934 930
935 // When called from -windowWillExitFullScreen:, the button's frame may not 931 // When called from -windowWillExitFullScreen:, the button's frame may not
936 // be updated yet to match the new window size. 932 // be updated yet to match the new window size.
937 // We need to return where the button should be positioned. 933 // We need to return where the button should be positioned.
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 return nil; 1237 return nil;
1242 } 1238 }
1243 1239
1244 - (BOOL)isFullscreenForTabContent { 1240 - (BOOL)isFullscreenForTabContent {
1245 return browser_->exclusive_access_manager() 1241 return browser_->exclusive_access_manager()
1246 ->fullscreen_controller() 1242 ->fullscreen_controller()
1247 ->IsWindowFullscreenForTabOrPending(); 1243 ->IsWindowFullscreenForTabOrPending();
1248 } 1244 }
1249 1245
1250 @end // @implementation BrowserWindowController(Private) 1246 @end // @implementation BrowserWindowController(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698