| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 | 330 |
| 331 void NativeWidgetMac::StackAtTop() { | 331 void NativeWidgetMac::StackAtTop() { |
| 332 NOTIMPLEMENTED(); | 332 NOTIMPLEMENTED(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 void NativeWidgetMac::StackBelow(gfx::NativeView native_view) { | 335 void NativeWidgetMac::StackBelow(gfx::NativeView native_view) { |
| 336 NOTIMPLEMENTED(); | 336 NOTIMPLEMENTED(); |
| 337 } | 337 } |
| 338 | 338 |
| 339 void NativeWidgetMac::SetShape(SkRegion* shape) { | 339 void NativeWidgetMac::SetShape(std::unique_ptr<SkRegion> shape) { |
| 340 NOTIMPLEMENTED(); | 340 NOTIMPLEMENTED(); |
| 341 } | 341 } |
| 342 | 342 |
| 343 void NativeWidgetMac::Close() { | 343 void NativeWidgetMac::Close() { |
| 344 if (!bridge_) | 344 if (!bridge_) |
| 345 return; | 345 return; |
| 346 | 346 |
| 347 NSWindow* window = GetNativeWindow(); | 347 NSWindow* window = GetNativeWindow(); |
| 348 if (IsWindowModalSheet()) { | 348 if (IsWindowModalSheet()) { |
| 349 // Sheets can't be closed normally. This starts the sheet closing. Once the | 349 // Sheets can't be closed normally. This starts the sheet closing. Once the |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; | 762 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; |
| 763 } | 763 } |
| 764 | 764 |
| 765 - (void)animationDidEnd:(NSAnimation*)animation { | 765 - (void)animationDidEnd:(NSAnimation*)animation { |
| 766 [window_ close]; | 766 [window_ close]; |
| 767 [animation_ setDelegate:nil]; | 767 [animation_ setDelegate:nil]; |
| 768 [self release]; | 768 [self release]; |
| 769 } | 769 } |
| 770 | 770 |
| 771 @end | 771 @end |
| OLD | NEW |