| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 292 |
| 293 case WmWindowProperty::PANEL_ATTACHED: | 293 case WmWindowProperty::PANEL_ATTACHED: |
| 294 return window_->GetProperty(kPanelAttachedKey); | 294 return window_->GetProperty(kPanelAttachedKey); |
| 295 | 295 |
| 296 case WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY: | 296 case WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY: |
| 297 return window_->GetProperty(kSnapChildrenToPixelBoundary); | 297 return window_->GetProperty(kSnapChildrenToPixelBoundary); |
| 298 | 298 |
| 299 case WmWindowProperty::ALWAYS_ON_TOP: | 299 case WmWindowProperty::ALWAYS_ON_TOP: |
| 300 return window_->GetProperty(aura::client::kAlwaysOnTopKey); | 300 return window_->GetProperty(aura::client::kAlwaysOnTopKey); |
| 301 | 301 |
| 302 case WmWindowProperty::EXCLUDE_FROM_MRU: | |
| 303 return window_->GetProperty(aura::client::kExcludeFromMruKey); | |
| 304 | |
| 305 default: | 302 default: |
| 306 NOTREACHED(); | 303 NOTREACHED(); |
| 307 break; | 304 break; |
| 308 } | 305 } |
| 309 | 306 |
| 310 return false; | 307 return false; |
| 311 } | 308 } |
| 312 | 309 |
| 313 void WmWindowAura::SetBoolProperty(WmWindowProperty key, bool value) { | 310 void WmWindowAura::SetBoolProperty(WmWindowProperty key, bool value) { |
| 314 switch (key) { | 311 switch (key) { |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); | 735 window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); |
| 739 } | 736 } |
| 740 | 737 |
| 741 void WmWindowAura::Unminimize() { | 738 void WmWindowAura::Unminimize() { |
| 742 window_->SetProperty( | 739 window_->SetProperty( |
| 743 aura::client::kShowStateKey, | 740 aura::client::kShowStateKey, |
| 744 window_->GetProperty(aura::client::kRestoreShowStateKey)); | 741 window_->GetProperty(aura::client::kRestoreShowStateKey)); |
| 745 window_->ClearProperty(aura::client::kRestoreShowStateKey); | 742 window_->ClearProperty(aura::client::kRestoreShowStateKey); |
| 746 } | 743 } |
| 747 | 744 |
| 748 void WmWindowAura::SetExcludedFromMru(bool excluded_from_mru) { | |
| 749 window_->SetProperty(aura::client::kExcludeFromMruKey, excluded_from_mru); | |
| 750 } | |
| 751 | |
| 752 std::vector<WmWindow*> WmWindowAura::GetChildren() { | 745 std::vector<WmWindow*> WmWindowAura::GetChildren() { |
| 753 return FromAuraWindows(window_->children()); | 746 return FromAuraWindows(window_->children()); |
| 754 } | 747 } |
| 755 | 748 |
| 756 WmWindow* WmWindowAura::GetChildByShellWindowId(int id) { | 749 WmWindow* WmWindowAura::GetChildByShellWindowId(int id) { |
| 757 return Get(window_->GetChildById(id)); | 750 return Get(window_->GetChildById(id)); |
| 758 } | 751 } |
| 759 | 752 |
| 760 void WmWindowAura::ShowResizeShadow(int component) { | 753 void WmWindowAura::ShowResizeShadow(int component) { |
| 761 ResizeShadowController* resize_shadow_controller = | 754 ResizeShadowController* resize_shadow_controller = |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 ash::wm::GetWindowState(window_)->OnWindowShowStateChanged(); | 884 ash::wm::GetWindowState(window_)->OnWindowShowStateChanged(); |
| 892 return; | 885 return; |
| 893 } | 886 } |
| 894 WmWindowProperty wm_property; | 887 WmWindowProperty wm_property; |
| 895 if (key == aura::client::kAlwaysOnTopKey) { | 888 if (key == aura::client::kAlwaysOnTopKey) { |
| 896 wm_property = WmWindowProperty::ALWAYS_ON_TOP; | 889 wm_property = WmWindowProperty::ALWAYS_ON_TOP; |
| 897 } else if (key == aura::client::kAppIconKey) { | 890 } else if (key == aura::client::kAppIconKey) { |
| 898 wm_property = WmWindowProperty::APP_ICON; | 891 wm_property = WmWindowProperty::APP_ICON; |
| 899 } else if (key == aura::client::kDrawAttentionKey) { | 892 } else if (key == aura::client::kDrawAttentionKey) { |
| 900 wm_property = WmWindowProperty::DRAW_ATTENTION; | 893 wm_property = WmWindowProperty::DRAW_ATTENTION; |
| 901 } else if (key == aura::client::kExcludeFromMruKey) { | |
| 902 wm_property = WmWindowProperty::EXCLUDE_FROM_MRU; | |
| 903 } else if (key == aura::client::kModalKey) { | 894 } else if (key == aura::client::kModalKey) { |
| 904 wm_property = WmWindowProperty::MODAL_TYPE; | 895 wm_property = WmWindowProperty::MODAL_TYPE; |
| 905 } else if (key == kPanelAttachedKey) { | 896 } else if (key == kPanelAttachedKey) { |
| 906 wm_property = WmWindowProperty::PANEL_ATTACHED; | 897 wm_property = WmWindowProperty::PANEL_ATTACHED; |
| 907 } else if (key == kShelfIDKey) { | 898 } else if (key == kShelfIDKey) { |
| 908 wm_property = WmWindowProperty::SHELF_ID; | 899 wm_property = WmWindowProperty::SHELF_ID; |
| 909 } else if (key == kShelfItemTypeKey) { | 900 } else if (key == kShelfItemTypeKey) { |
| 910 wm_property = WmWindowProperty::SHELF_ITEM_TYPE; | 901 wm_property = WmWindowProperty::SHELF_ITEM_TYPE; |
| 911 } else if (key == kSnapChildrenToPixelBoundary) { | 902 } else if (key == kSnapChildrenToPixelBoundary) { |
| 912 wm_property = WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY; | 903 wm_property = WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 observer.OnTransientChildAdded(this, Get(transient)); | 953 observer.OnTransientChildAdded(this, Get(transient)); |
| 963 } | 954 } |
| 964 | 955 |
| 965 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, | 956 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, |
| 966 aura::Window* transient) { | 957 aura::Window* transient) { |
| 967 for (auto& observer : transient_observers_) | 958 for (auto& observer : transient_observers_) |
| 968 observer.OnTransientChildRemoved(this, Get(transient)); | 959 observer.OnTransientChildRemoved(this, Get(transient)); |
| 969 } | 960 } |
| 970 | 961 |
| 971 } // namespace ash | 962 } // namespace ash |
| OLD | NEW |