| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ui/views/widget/native_widget_mac.h" | 5 #include "ui/views/widget/native_widget_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } | 456 } |
| 457 | 457 |
| 458 bool NativeWidgetMac::IsAlwaysOnTop() const { | 458 bool NativeWidgetMac::IsAlwaysOnTop() const { |
| 459 return gfx::IsNSWindowAlwaysOnTop(GetNativeWindow()); | 459 return gfx::IsNSWindowAlwaysOnTop(GetNativeWindow()); |
| 460 } | 460 } |
| 461 | 461 |
| 462 void NativeWidgetMac::SetVisibleOnAllWorkspaces(bool always_visible) { | 462 void NativeWidgetMac::SetVisibleOnAllWorkspaces(bool always_visible) { |
| 463 gfx::SetNSWindowVisibleOnAllWorkspaces(GetNativeWindow(), always_visible); | 463 gfx::SetNSWindowVisibleOnAllWorkspaces(GetNativeWindow(), always_visible); |
| 464 } | 464 } |
| 465 | 465 |
| 466 bool NativeWidgetMac::IsVisibleOnAllWorkspaces() const { |
| 467 return false; |
| 468 } |
| 469 |
| 466 void NativeWidgetMac::Maximize() { | 470 void NativeWidgetMac::Maximize() { |
| 467 NOTIMPLEMENTED(); // See IsMaximized(). | 471 NOTIMPLEMENTED(); // See IsMaximized(). |
| 468 } | 472 } |
| 469 | 473 |
| 470 void NativeWidgetMac::Minimize() { | 474 void NativeWidgetMac::Minimize() { |
| 471 NSWindow* window = GetNativeWindow(); | 475 NSWindow* window = GetNativeWindow(); |
| 472 // Calling performMiniaturize: will momentarily highlight the button, but | 476 // Calling performMiniaturize: will momentarily highlight the button, but |
| 473 // AppKit will reject it if there is no miniaturize button. | 477 // AppKit will reject it if there is no miniaturize button. |
| 474 if ([window styleMask] & NSMiniaturizableWindowMask) | 478 if ([window styleMask] & NSMiniaturizableWindowMask) |
| 475 [window performMiniaturize:nil]; | 479 [window performMiniaturize:nil]; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; | 762 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; |
| 759 } | 763 } |
| 760 | 764 |
| 761 - (void)animationDidEnd:(NSAnimation*)animation { | 765 - (void)animationDidEnd:(NSAnimation*)animation { |
| 762 [window_ close]; | 766 [window_ close]; |
| 763 [animation_ setDelegate:nil]; | 767 [animation_ setDelegate:nil]; |
| 764 [self release]; | 768 [self release]; |
| 765 } | 769 } |
| 766 | 770 |
| 767 @end | 771 @end |
| OLD | NEW |