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 "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 namespace views { | 37 namespace views { |
38 namespace { | 38 namespace { |
39 | 39 |
40 NSInteger StyleMaskForParams(const Widget::InitParams& params) { | 40 NSInteger StyleMaskForParams(const Widget::InitParams& params) { |
41 // TODO(tapted): Determine better masks when there are use cases for it. | 41 // TODO(tapted): Determine better masks when there are use cases for it. |
42 if (params.remove_standard_frame) | 42 if (params.remove_standard_frame) |
43 return NSBorderlessWindowMask; | 43 return NSBorderlessWindowMask; |
44 | 44 |
45 if (params.type == Widget::InitParams::TYPE_WINDOW) { | 45 if (params.type == Widget::InitParams::TYPE_WINDOW) { |
46 return NSTitledWindowMask | NSClosableWindowMask | | 46 return NSTitledWindowMask | NSClosableWindowMask | |
47 NSMiniaturizableWindowMask | NSResizableWindowMask; | 47 NSMiniaturizableWindowMask | NSResizableWindowMask | |
| 48 NSTexturedBackgroundWindowMask; |
48 } | 49 } |
49 return NSBorderlessWindowMask; | 50 return NSBorderlessWindowMask; |
50 } | 51 } |
51 | 52 |
52 } // namespace | 53 } // namespace |
53 | 54 |
54 //////////////////////////////////////////////////////////////////////////////// | 55 //////////////////////////////////////////////////////////////////////////////// |
55 // NativeWidgetMac, public: | 56 // NativeWidgetMac, public: |
56 | 57 |
57 NativeWidgetMac::NativeWidgetMac(internal::NativeWidgetDelegate* delegate) | 58 NativeWidgetMac::NativeWidgetMac(internal::NativeWidgetDelegate* delegate) |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; | 690 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; |
690 } | 691 } |
691 | 692 |
692 - (void)animationDidEnd:(NSAnimation*)animation { | 693 - (void)animationDidEnd:(NSAnimation*)animation { |
693 [window_ close]; | 694 [window_ close]; |
694 [animation_ setDelegate:nil]; | 695 [animation_ setDelegate:nil]; |
695 [self release]; | 696 [self release]; |
696 } | 697 } |
697 | 698 |
698 @end | 699 @end |
OLD | NEW |