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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.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
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/desktop_aura/desktop_window_tree_host_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 compositor()->SetVisible(true); 438 compositor()->SetVisible(true);
439 content_window_->Show(); 439 content_window_->Show();
440 } 440 }
441 SetWindowTransparency(); 441 SetWindowTransparency();
442 } 442 }
443 443
444 bool DesktopWindowTreeHostWin::IsFullscreen() const { 444 bool DesktopWindowTreeHostWin::IsFullscreen() const {
445 return message_handler_->fullscreen_handler()->fullscreen(); 445 return message_handler_->fullscreen_handler()->fullscreen();
446 } 446 }
447 447
448 void DesktopWindowTreeHostWin::SetOpacity(unsigned char opacity) { 448 void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
449 content_window_->layer()->SetOpacity(opacity / 255.0); 449 content_window_->layer()->SetOpacity(opacity);
450 } 450 }
451 451
452 void DesktopWindowTreeHostWin::SetWindowIcons( 452 void DesktopWindowTreeHostWin::SetWindowIcons(
453 const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon) { 453 const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon) {
454 message_handler_->SetWindowIcons(window_icon, app_icon); 454 message_handler_->SetWindowIcons(window_icon, app_icon);
455 } 455 }
456 456
457 void DesktopWindowTreeHostWin::InitModalType(ui::ModalType modal_type) { 457 void DesktopWindowTreeHostWin::InitModalType(ui::ModalType modal_type) {
458 message_handler_->InitModalType(modal_type); 458 message_handler_->InitModalType(modal_type);
459 } 459 }
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 985
986 // static 986 // static
987 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 987 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
988 internal::NativeWidgetDelegate* native_widget_delegate, 988 internal::NativeWidgetDelegate* native_widget_delegate,
989 DesktopNativeWidgetAura* desktop_native_widget_aura) { 989 DesktopNativeWidgetAura* desktop_native_widget_aura) {
990 return new DesktopWindowTreeHostWin(native_widget_delegate, 990 return new DesktopWindowTreeHostWin(native_widget_delegate,
991 desktop_native_widget_aura); 991 desktop_native_widget_aura);
992 } 992 }
993 993
994 } // namespace views 994 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698