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

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

Issue 2009333002: Converts Widget::SetOpacity from char to float (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « ui/views/widget/native_widget_mac.h ('k') | 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 <utility> 9 #include <utility>
10 10
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_mac.h ('k') | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698