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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 return; | 413 return; |
414 | 414 |
415 switch (state) { | 415 switch (state) { |
416 case ui::SHOW_STATE_DEFAULT: | 416 case ui::SHOW_STATE_DEFAULT: |
417 case ui::SHOW_STATE_NORMAL: | 417 case ui::SHOW_STATE_NORMAL: |
418 case ui::SHOW_STATE_INACTIVE: | 418 case ui::SHOW_STATE_INACTIVE: |
419 break; | 419 break; |
420 case ui::SHOW_STATE_MINIMIZED: | 420 case ui::SHOW_STATE_MINIMIZED: |
421 case ui::SHOW_STATE_MAXIMIZED: | 421 case ui::SHOW_STATE_MAXIMIZED: |
422 case ui::SHOW_STATE_FULLSCREEN: | 422 case ui::SHOW_STATE_FULLSCREEN: |
423 case ui::SHOW_STATE_DOCKED: | |
424 NOTIMPLEMENTED(); | 423 NOTIMPLEMENTED(); |
425 break; | 424 break; |
426 case ui::SHOW_STATE_END: | 425 case ui::SHOW_STATE_END: |
427 NOTREACHED(); | 426 NOTREACHED(); |
428 break; | 427 break; |
429 } | 428 } |
430 bridge_->SetVisibilityState(state == ui::SHOW_STATE_INACTIVE | 429 bridge_->SetVisibilityState(state == ui::SHOW_STATE_INACTIVE |
431 ? BridgedNativeWidget::SHOW_INACTIVE | 430 ? BridgedNativeWidget::SHOW_INACTIVE |
432 : BridgedNativeWidget::SHOW_AND_ACTIVATE_WINDOW); | 431 : BridgedNativeWidget::SHOW_AND_ACTIVATE_WINDOW); |
433 | 432 |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; | 790 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; |
792 } | 791 } |
793 | 792 |
794 - (void)animationDidEnd:(NSAnimation*)animation { | 793 - (void)animationDidEnd:(NSAnimation*)animation { |
795 [window_ close]; | 794 [window_ close]; |
796 [animation_ setDelegate:nil]; | 795 [animation_ setDelegate:nil]; |
797 [self release]; | 796 [self release]; |
798 } | 797 } |
799 | 798 |
800 @end | 799 @end |
OLD | NEW |