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

Side by Side Diff: ui/gfx/mac/nswindow_frame_controls.mm

Issue 1917973002: mac: Remove IsOSLion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tapted 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
« no previous file with comments | « ui/gfx/font_fallback_mac.mm ('k') | ui/gl/gpu_switching_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/gfx/mac/nswindow_frame_controls.h" 5 #import "ui/gfx/mac/nswindow_frame_controls.h"
6 6
7 #import "base/mac/mac_util.h"
8 #import "base/mac/sdk_forward_declarations.h" 7 #import "base/mac/sdk_forward_declarations.h"
9 #include "ui/gfx/geometry/size.h" 8 #include "ui/gfx/geometry/size.h"
10 9
11 namespace { 10 namespace {
12 11
13 // The value used to represent an unbounded width or height. 12 // The value used to represent an unbounded width or height.
14 const int kUnboundedSize = 0; 13 const int kUnboundedSize = 0;
15 14
16 void SetResizableStyleMask(NSWindow* window, bool resizable) { 15 void SetResizableStyleMask(NSWindow* window, bool resizable) {
17 NSUInteger style_mask = [window styleMask]; 16 NSUInteger style_mask = [window styleMask];
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 76
78 CGFloat max_width = 77 CGFloat max_width =
79 max_size.width() == kUnboundedSize ? CGFLOAT_MAX : max_size.width(); 78 max_size.width() == kUnboundedSize ? CGFLOAT_MAX : max_size.width();
80 CGFloat max_height = 79 CGFloat max_height =
81 max_size.height() == kUnboundedSize ? CGFLOAT_MAX : max_size.height(); 80 max_size.height() == kUnboundedSize ? CGFLOAT_MAX : max_size.height();
82 [window setContentMaxSize:NSMakeSize(max_width, max_height)]; 81 [window setContentMaxSize:NSMakeSize(max_width, max_height)];
83 82
84 SetResizableStyleMask(window, can_resize); 83 SetResizableStyleMask(window, can_resize);
85 [window setShowsResizeIndicator:can_resize]; 84 [window setShowsResizeIndicator:can_resize];
86 85
87 // Set the window to participate in Lion Fullscreen mode. Setting this flag 86 // Set the window to participate in Lion Fullscreen mode.
88 // has no effect on Snow Leopard or earlier. UI controls for fullscreen are 87 SetNSWindowCanFullscreen(window, can_fullscreen);
89 // only shown for windows that have unbounded size.
90 if (base::mac::IsOSLionOrLater())
91 SetNSWindowCanFullscreen(window, can_fullscreen);
92 88
93 [[window standardWindowButton:NSWindowZoomButton] setEnabled:can_fullscreen]; 89 [[window standardWindowButton:NSWindowZoomButton] setEnabled:can_fullscreen];
94 } 90 }
95 91
96 } // namespace gfx 92 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/font_fallback_mac.mm ('k') | ui/gl/gpu_switching_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698