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

Side by Side Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2693823004: aura-mus: Implement DesktopWindowTreeHostMus::SetOpacity(). (Closed)
Patch Set: Removed the comments in WindowPortMus::SetOpacityFromServer Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/desktop_window_tree_host_mus.h" 5 #include "ui/views/mus/desktop_window_tree_host_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 return; // Nothing to do. 668 return; // Nothing to do.
669 669
670 wm::SetWindowFullscreen(window(), fullscreen); 670 wm::SetWindowFullscreen(window(), fullscreen);
671 } 671 }
672 672
673 bool DesktopWindowTreeHostMus::IsFullscreen() const { 673 bool DesktopWindowTreeHostMus::IsFullscreen() const {
674 return window()->GetProperty(aura::client::kShowStateKey) == 674 return window()->GetProperty(aura::client::kShowStateKey) ==
675 ui::SHOW_STATE_FULLSCREEN; 675 ui::SHOW_STATE_FULLSCREEN;
676 } 676 }
677 void DesktopWindowTreeHostMus::SetOpacity(float opacity) { 677 void DesktopWindowTreeHostMus::SetOpacity(float opacity) {
678 // TODO: this likely need to go to server so that non-client decorations get 678 WindowTreeHostMus::SetOpacity(opacity);
679 // opacity. http://crbug.com/663619.
680 window()->layer()->SetOpacity(opacity);
681 } 679 }
682 680
683 void DesktopWindowTreeHostMus::SetWindowIcons(const gfx::ImageSkia& window_icon, 681 void DesktopWindowTreeHostMus::SetWindowIcons(const gfx::ImageSkia& window_icon,
684 const gfx::ImageSkia& app_icon) { 682 const gfx::ImageSkia& app_icon) {
685 NativeWidgetAura::AssignIconToAuraWindow(window(), window_icon, app_icon); 683 NativeWidgetAura::AssignIconToAuraWindow(window(), window_icon, app_icon);
686 } 684 }
687 685
688 void DesktopWindowTreeHostMus::InitModalType(ui::ModalType modal_type) { 686 void DesktopWindowTreeHostMus::InitModalType(ui::ModalType modal_type) {
689 window()->SetProperty(aura::client::kModalKey, modal_type); 687 window()->SetProperty(aura::client::kModalKey, modal_type);
690 } 688 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 aura::client::FocusClient* focus_client, 796 aura::client::FocusClient* focus_client,
799 aura::Window* window) { 797 aura::Window* window) {
800 if (window == this->window()) { 798 if (window == this->window()) {
801 desktop_native_widget_aura_->HandleActivationChanged(true); 799 desktop_native_widget_aura_->HandleActivationChanged(true);
802 } else if (is_active_) { 800 } else if (is_active_) {
803 desktop_native_widget_aura_->HandleActivationChanged(false); 801 desktop_native_widget_aura_->HandleActivationChanged(false);
804 } 802 }
805 } 803 }
806 804
807 } // namespace views 805 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_host_mus_delegate.h ('k') | ui/views/mus/desktop_window_tree_host_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698