OLD | NEW |
---|---|
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 "ash/aura/wm_window_aura.h" | 5 #include "ash/aura/wm_window_aura.h" |
6 | 6 |
7 #include "ash/aura/aura_layout_manager_adapter.h" | 7 #include "ash/aura/aura_layout_manager_adapter.h" |
8 #include "ash/aura/wm_root_window_controller_aura.h" | 8 #include "ash/aura/wm_root_window_controller_aura.h" |
9 #include "ash/aura/wm_shell_aura.h" | 9 #include "ash/aura/wm_shell_aura.h" |
10 #include "ash/common/ash_constants.h" | 10 #include "ash/common/ash_constants.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 | 188 |
189 void WmWindowAura::SetAppType(int app_type) const { | 189 void WmWindowAura::SetAppType(int app_type) const { |
190 window_->SetProperty(aura::client::kAppType, app_type); | 190 window_->SetProperty(aura::client::kAppType, app_type); |
191 } | 191 } |
192 | 192 |
193 bool WmWindowAura::IsBubble() { | 193 bool WmWindowAura::IsBubble() { |
194 views::Widget* widget = views::Widget::GetWidgetForNativeView(window_); | 194 views::Widget* widget = views::Widget::GetWidgetForNativeView(window_); |
195 return widget->widget_delegate()->AsBubbleDialogDelegate() != nullptr; | 195 return widget->widget_delegate()->AsBubbleDialogDelegate() != nullptr; |
196 } | 196 } |
197 | 197 |
198 bool WmWindowAura::GetLayerTargetVisibility() { | |
James Cook
2016/10/04 23:16:04
match header file order
sky
2016/10/06 17:57:06
Done.
| |
199 return GetLayer()->GetTargetVisibility(); | |
200 } | |
201 | |
202 bool WmWindowAura::GetLayerVisible() { | |
203 return GetLayer()->visible(); | |
204 } | |
205 | |
198 ui::Layer* WmWindowAura::GetLayer() { | 206 ui::Layer* WmWindowAura::GetLayer() { |
199 return window_->layer(); | 207 return window_->layer(); |
200 } | 208 } |
201 | 209 |
202 display::Display WmWindowAura::GetDisplayNearestWindow() { | 210 display::Display WmWindowAura::GetDisplayNearestWindow() { |
203 return display::Screen::GetScreen()->GetDisplayNearestWindow(window_); | 211 return display::Screen::GetScreen()->GetDisplayNearestWindow(window_); |
204 } | 212 } |
205 | 213 |
206 bool WmWindowAura::HasNonClientArea() { | 214 bool WmWindowAura::HasNonClientArea() { |
207 return window_->delegate() ? true : false; | 215 return window_->delegate() ? true : false; |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
619 } | 627 } |
620 | 628 |
621 void WmWindowAura::StackChildAbove(WmWindow* child, WmWindow* target) { | 629 void WmWindowAura::StackChildAbove(WmWindow* child, WmWindow* target) { |
622 window_->StackChildAbove(GetAuraWindow(child), GetAuraWindow(target)); | 630 window_->StackChildAbove(GetAuraWindow(child), GetAuraWindow(target)); |
623 } | 631 } |
624 | 632 |
625 void WmWindowAura::StackChildBelow(WmWindow* child, WmWindow* target) { | 633 void WmWindowAura::StackChildBelow(WmWindow* child, WmWindow* target) { |
626 window_->StackChildBelow(GetAuraWindow(child), GetAuraWindow(target)); | 634 window_->StackChildBelow(GetAuraWindow(child), GetAuraWindow(target)); |
627 } | 635 } |
628 | 636 |
637 void WmWindowAura::SetPinned(bool trusted) { | |
638 wm::PinWindow(window_, trusted); | |
639 } | |
640 | |
629 void WmWindowAura::SetAlwaysOnTop(bool value) { | 641 void WmWindowAura::SetAlwaysOnTop(bool value) { |
630 window_->SetProperty(aura::client::kAlwaysOnTopKey, value); | 642 window_->SetProperty(aura::client::kAlwaysOnTopKey, value); |
631 } | 643 } |
632 | 644 |
633 bool WmWindowAura::IsAlwaysOnTop() const { | 645 bool WmWindowAura::IsAlwaysOnTop() const { |
634 return window_->GetProperty(aura::client::kAlwaysOnTopKey); | 646 return window_->GetProperty(aura::client::kAlwaysOnTopKey); |
635 } | 647 } |
636 | 648 |
637 void WmWindowAura::Hide() { | 649 void WmWindowAura::Hide() { |
638 window_->Hide(); | 650 window_->Hide(); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
886 OnTransientChildAdded(this, Get(transient))); | 898 OnTransientChildAdded(this, Get(transient))); |
887 } | 899 } |
888 | 900 |
889 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, | 901 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, |
890 aura::Window* transient) { | 902 aura::Window* transient) { |
891 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 903 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
892 OnTransientChildRemoved(this, Get(transient))); | 904 OnTransientChildRemoved(this, Get(transient))); |
893 } | 905 } |
894 | 906 |
895 } // namespace ash | 907 } // namespace ash |
OLD | NEW |