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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 return; | 473 return; |
474 | 474 |
475 bridge_->ToggleDesiredFullscreenState(); | 475 bridge_->ToggleDesiredFullscreenState(); |
476 } | 476 } |
477 | 477 |
478 bool NativeWidgetMac::IsFullscreen() const { | 478 bool NativeWidgetMac::IsFullscreen() const { |
479 return bridge_ && bridge_->target_fullscreen_state(); | 479 return bridge_ && bridge_->target_fullscreen_state(); |
480 } | 480 } |
481 | 481 |
482 void NativeWidgetMac::SetOpacity(unsigned char opacity) { | 482 void NativeWidgetMac::SetOpacity(unsigned char opacity) { |
483 NOTIMPLEMENTED(); | 483 if (bridge_ && bridge_->layer()) |
484 bridge_->layer()->SetOpacity(opacity / 255.0); | |
tapted
2015/12/17 22:38:20
I don't know if this is correct. E.g. DesktopWindo
Andrey Kraynov
2015/12/18 13:51:59
OK, I reverted my changes in this file.
| |
484 } | 485 } |
485 | 486 |
486 void NativeWidgetMac::SetUseDragFrame(bool use_drag_frame) { | 487 void NativeWidgetMac::SetUseDragFrame(bool use_drag_frame) { |
487 NOTIMPLEMENTED(); | 488 NOTIMPLEMENTED(); |
488 } | 489 } |
489 | 490 |
490 void NativeWidgetMac::FlashFrame(bool flash_frame) { | 491 void NativeWidgetMac::FlashFrame(bool flash_frame) { |
491 NOTIMPLEMENTED(); | 492 NOTIMPLEMENTED(); |
492 } | 493 } |
493 | 494 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
719 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; | 720 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; |
720 } | 721 } |
721 | 722 |
722 - (void)animationDidEnd:(NSAnimation*)animation { | 723 - (void)animationDidEnd:(NSAnimation*)animation { |
723 [window_ close]; | 724 [window_ close]; |
724 [animation_ setDelegate:nil]; | 725 [animation_ setDelegate:nil]; |
725 [self release]; | 726 [self release]; |
726 } | 727 } |
727 | 728 |
728 @end | 729 @end |
OLD | NEW |