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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

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_aura.h ('k') | ui/views/widget/native_widget_mac.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 window_->SetProperty( 597 window_->SetProperty(
598 aura::client::kShowStateKey, 598 aura::client::kShowStateKey,
599 fullscreen ? ui::SHOW_STATE_FULLSCREEN : saved_window_state_); 599 fullscreen ? ui::SHOW_STATE_FULLSCREEN : saved_window_state_);
600 } 600 }
601 601
602 bool NativeWidgetAura::IsFullscreen() const { 602 bool NativeWidgetAura::IsFullscreen() const {
603 return window_ && window_->GetProperty(aura::client::kShowStateKey) == 603 return window_ && window_->GetProperty(aura::client::kShowStateKey) ==
604 ui::SHOW_STATE_FULLSCREEN; 604 ui::SHOW_STATE_FULLSCREEN;
605 } 605 }
606 606
607 void NativeWidgetAura::SetOpacity(unsigned char opacity) { 607 void NativeWidgetAura::SetOpacity(float opacity) {
608 if (window_) 608 if (window_)
609 window_->layer()->SetOpacity(opacity / 255.0); 609 window_->layer()->SetOpacity(opacity);
610 } 610 }
611 611
612 void NativeWidgetAura::FlashFrame(bool flash) { 612 void NativeWidgetAura::FlashFrame(bool flash) {
613 if (window_) 613 if (window_)
614 window_->SetProperty(aura::client::kDrawAttentionKey, flash); 614 window_->SetProperty(aura::client::kDrawAttentionKey, flash);
615 } 615 }
616 616
617 void NativeWidgetAura::RunShellDrag(View* view, 617 void NativeWidgetAura::RunShellDrag(View* view,
618 const ui::OSExchangeData& data, 618 const ui::OSExchangeData& data,
619 const gfx::Point& location, 619 const gfx::Point& location,
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 gfx::NativeView native_view) { 1192 gfx::NativeView native_view) {
1193 aura::client::CaptureClient* capture_client = 1193 aura::client::CaptureClient* capture_client =
1194 aura::client::GetCaptureClient(native_view->GetRootWindow()); 1194 aura::client::GetCaptureClient(native_view->GetRootWindow());
1195 if (!capture_client) 1195 if (!capture_client)
1196 return nullptr; 1196 return nullptr;
1197 return capture_client->GetGlobalCaptureWindow(); 1197 return capture_client->GetGlobalCaptureWindow();
1198 } 1198 }
1199 1199
1200 } // namespace internal 1200 } // namespace internal
1201 } // namespace views 1201 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/native_widget_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698