refactor: remove 10.9 specific menu code (#15578)
This commit is contained in:
parent
87565ec667
commit
dcd2bf451d
1 changed files with 3 additions and 10 deletions
|
@ -1358,9 +1358,8 @@ views::View* NativeWindowMac::GetContentsView() {
|
||||||
|
|
||||||
void NativeWindowMac::AddContentViewLayers() {
|
void NativeWindowMac::AddContentViewLayers() {
|
||||||
// Make sure the bottom corner is rounded for non-modal windows:
|
// Make sure the bottom corner is rounded for non-modal windows:
|
||||||
// http://crbug.com/396264. But do not enable it on OS X 10.9 for transparent
|
// http://crbug.com/396264.
|
||||||
// window, otherwise a semi-transparent frame would show.
|
if (!is_modal()) {
|
||||||
if (!(transparent() && base::mac::IsOS10_9()) && !is_modal()) {
|
|
||||||
// For normal window, we need to explicitly set layer for contentView to
|
// For normal window, we need to explicitly set layer for contentView to
|
||||||
// make setBackgroundColor work correctly.
|
// make setBackgroundColor work correctly.
|
||||||
// There is no need to do so for frameless window, and doing so would make
|
// There is no need to do so for frameless window, and doing so would make
|
||||||
|
@ -1397,14 +1396,8 @@ void NativeWindowMac::AddContentViewLayers() {
|
||||||
[[CustomWindowButtonView alloc] initWithFrame:NSZeroRect]);
|
[[CustomWindowButtonView alloc] initWithFrame:NSZeroRect]);
|
||||||
[[window_ contentView] addSubview:buttons_view_];
|
[[window_ contentView] addSubview:buttons_view_];
|
||||||
} else {
|
} else {
|
||||||
if (title_bar_style_ != NORMAL) {
|
if (title_bar_style_ != NORMAL)
|
||||||
if (base::mac::IsOS10_9()) {
|
|
||||||
ShowWindowButton(NSWindowZoomButton);
|
|
||||||
ShowWindowButton(NSWindowMiniaturizeButton);
|
|
||||||
ShowWindowButton(NSWindowCloseButton);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Hide the window buttons.
|
// Hide the window buttons.
|
||||||
[[window_ standardWindowButton:NSWindowZoomButton] setHidden:YES];
|
[[window_ standardWindowButton:NSWindowZoomButton] setHidden:YES];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue