Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: ui/views/widget/native_widget_mac.mm

Issue 1590803003: MacViews: Implement NativeWidgetMac::SetOpacity function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review remarks. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 return; 475 return;
476 476
477 bridge_->ToggleDesiredFullscreenState(); 477 bridge_->ToggleDesiredFullscreenState();
478 } 478 }
479 479
480 bool NativeWidgetMac::IsFullscreen() const { 480 bool NativeWidgetMac::IsFullscreen() const {
481 return bridge_ && bridge_->target_fullscreen_state(); 481 return bridge_ && bridge_->target_fullscreen_state();
482 } 482 }
483 483
484 void NativeWidgetMac::SetOpacity(unsigned char opacity) { 484 void NativeWidgetMac::SetOpacity(unsigned char opacity) {
485 NOTIMPLEMENTED(); 485 [GetNativeWindow() setAlphaValue:opacity / 255.0];
486 } 486 }
487 487
488 void NativeWidgetMac::SetUseDragFrame(bool use_drag_frame) { 488 void NativeWidgetMac::SetUseDragFrame(bool use_drag_frame) {
489 NOTIMPLEMENTED(); 489 NOTIMPLEMENTED();
490 } 490 }
491 491
492 void NativeWidgetMac::FlashFrame(bool flash_frame) { 492 void NativeWidgetMac::FlashFrame(bool flash_frame) {
493 NOTIMPLEMENTED(); 493 NOTIMPLEMENTED();
494 } 494 }
495 495
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 721 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
722 } 722 }
723 723
724 - (void)animationDidEnd:(NSAnimation*)animation { 724 - (void)animationDidEnd:(NSAnimation*)animation {
725 [window_ close]; 725 [window_ close];
726 [animation_ setDelegate:nil]; 726 [animation_ setDelegate:nil];
727 [self release]; 727 [self release];
728 } 728 }
729 729
730 @end 730 @end
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698