| 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 if (!bridge_ || fullscreen == IsFullscreen()) | 487 if (!bridge_ || fullscreen == IsFullscreen()) |
| 488 return; | 488 return; |
| 489 | 489 |
| 490 bridge_->ToggleDesiredFullscreenState(); | 490 bridge_->ToggleDesiredFullscreenState(); |
| 491 } | 491 } |
| 492 | 492 |
| 493 bool NativeWidgetMac::IsFullscreen() const { | 493 bool NativeWidgetMac::IsFullscreen() const { |
| 494 return bridge_ && bridge_->target_fullscreen_state(); | 494 return bridge_ && bridge_->target_fullscreen_state(); |
| 495 } | 495 } |
| 496 | 496 |
| 497 void NativeWidgetMac::SetOpacity(unsigned char opacity) { | 497 void NativeWidgetMac::SetOpacity(float opacity) { |
| 498 [GetNativeWindow() setAlphaValue:opacity / 255.0]; | 498 [GetNativeWindow() setAlphaValue:opacity]; |
| 499 } | 499 } |
| 500 | 500 |
| 501 void NativeWidgetMac::FlashFrame(bool flash_frame) { | 501 void NativeWidgetMac::FlashFrame(bool flash_frame) { |
| 502 NOTIMPLEMENTED(); | 502 NOTIMPLEMENTED(); |
| 503 } | 503 } |
| 504 | 504 |
| 505 void NativeWidgetMac::RunShellDrag(View* view, | 505 void NativeWidgetMac::RunShellDrag(View* view, |
| 506 const ui::OSExchangeData& data, | 506 const ui::OSExchangeData& data, |
| 507 const gfx::Point& location, | 507 const gfx::Point& location, |
| 508 int operation, | 508 int operation, |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; | 747 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; |
| 748 } | 748 } |
| 749 | 749 |
| 750 - (void)animationDidEnd:(NSAnimation*)animation { | 750 - (void)animationDidEnd:(NSAnimation*)animation { |
| 751 [window_ close]; | 751 [window_ close]; |
| 752 [animation_ setDelegate:nil]; | 752 [animation_ setDelegate:nil]; |
| 753 [self release]; | 753 [self release]; |
| 754 } | 754 } |
| 755 | 755 |
| 756 @end | 756 @end |
| OLD | NEW |