| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 bridge_->OnSizeConstraintsChanged(); | 562 bridge_->OnSizeConstraintsChanged(); |
| 563 } | 563 } |
| 564 | 564 |
| 565 void NativeWidgetMac::RepostNativeEvent(gfx::NativeEvent native_event) { | 565 void NativeWidgetMac::RepostNativeEvent(gfx::NativeEvent native_event) { |
| 566 NOTIMPLEMENTED(); | 566 NOTIMPLEMENTED(); |
| 567 } | 567 } |
| 568 | 568 |
| 569 //////////////////////////////////////////////////////////////////////////////// | 569 //////////////////////////////////////////////////////////////////////////////// |
| 570 // NativeWidgetMac, protected: | 570 // NativeWidgetMac, protected: |
| 571 | 571 |
| 572 NSWindow* NativeWidgetMac::CreateNSWindow(const Widget::InitParams& params) { | 572 NativeWidgetMacNSWindow* NativeWidgetMac::CreateNSWindow( |
| 573 const Widget::InitParams& params) { |
| 573 return [[[NativeWidgetMacNSWindow alloc] | 574 return [[[NativeWidgetMacNSWindow alloc] |
| 574 initWithContentRect:ui::kWindowSizeDeterminedLater | 575 initWithContentRect:ui::kWindowSizeDeterminedLater |
| 575 styleMask:StyleMaskForParams(params) | 576 styleMask:StyleMaskForParams(params) |
| 576 backing:NSBackingStoreBuffered | 577 backing:NSBackingStoreBuffered |
| 577 defer:NO] autorelease]; | 578 defer:NO] autorelease]; |
| 578 } | 579 } |
| 579 | 580 |
| 580 //////////////////////////////////////////////////////////////////////////////// | 581 //////////////////////////////////////////////////////////////////////////////// |
| 581 // Widget, public: | 582 // Widget, public: |
| 582 | 583 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; | 707 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; |
| 707 } | 708 } |
| 708 | 709 |
| 709 - (void)animationDidEnd:(NSAnimation*)animation { | 710 - (void)animationDidEnd:(NSAnimation*)animation { |
| 710 [window_ close]; | 711 [window_ close]; |
| 711 [animation_ setDelegate:nil]; | 712 [animation_ setDelegate:nil]; |
| 712 [self release]; | 713 [self release]; |
| 713 } | 714 } |
| 714 | 715 |
| 715 @end | 716 @end |
| OLD | NEW |