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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 if (key == WmWindowProperty::SHELF_ID) | 271 if (key == WmWindowProperty::SHELF_ID) |
272 return GetShelfIDForWindow(window_); | 272 return GetShelfIDForWindow(window_); |
273 | 273 |
274 if (key == WmWindowProperty::TOP_VIEW_INSET) | 274 if (key == WmWindowProperty::TOP_VIEW_INSET) |
275 return window_->GetProperty(aura::client::kTopViewInset); | 275 return window_->GetProperty(aura::client::kTopViewInset); |
276 | 276 |
277 NOTREACHED(); | 277 NOTREACHED(); |
278 return 0; | 278 return 0; |
279 } | 279 } |
280 | 280 |
| 281 void WmWindowAura::SetIntProperty(WmWindowProperty key, int value) { |
| 282 if (key == WmWindowProperty::SHELF_ID) { |
| 283 SetShelfIDForWindow(value, window_); |
| 284 return; |
| 285 } |
| 286 |
| 287 NOTREACHED(); |
| 288 } |
| 289 |
| 290 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() { |
| 291 return window_->GetProperty(kShelfItemDetailsKey); |
| 292 } |
| 293 |
281 const wm::WindowState* WmWindowAura::GetWindowState() const { | 294 const wm::WindowState* WmWindowAura::GetWindowState() const { |
282 return ash::wm::GetWindowState(window_); | 295 return ash::wm::GetWindowState(window_); |
283 } | 296 } |
284 | 297 |
285 WmWindow* WmWindowAura::GetToplevelWindow() { | 298 WmWindow* WmWindowAura::GetToplevelWindow() { |
286 return Get(window_->GetToplevelWindow()); | 299 return Get(window_->GetToplevelWindow()); |
287 } | 300 } |
288 | 301 |
289 WmWindow* WmWindowAura::GetToplevelWindowForFocus() { | 302 WmWindow* WmWindowAura::GetToplevelWindowForFocus() { |
290 return Get(::wm::GetToplevelWindow(window_)); | 303 return Get(::wm::GetToplevelWindow(window_)); |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 ash::wm::GetWindowState(window_)->OnWindowShowStateChanged(); | 716 ash::wm::GetWindowState(window_)->OnWindowShowStateChanged(); |
704 return; | 717 return; |
705 } | 718 } |
706 WmWindowProperty wm_property; | 719 WmWindowProperty wm_property; |
707 if (key == kSnapChildrenToPixelBoundary) { | 720 if (key == kSnapChildrenToPixelBoundary) { |
708 wm_property = WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY; | 721 wm_property = WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY; |
709 } else if (key == aura::client::kAlwaysOnTopKey) { | 722 } else if (key == aura::client::kAlwaysOnTopKey) { |
710 wm_property = WmWindowProperty::ALWAYS_ON_TOP; | 723 wm_property = WmWindowProperty::ALWAYS_ON_TOP; |
711 } else if (key == kShelfID) { | 724 } else if (key == kShelfID) { |
712 wm_property = WmWindowProperty::SHELF_ID; | 725 wm_property = WmWindowProperty::SHELF_ID; |
| 726 } else if (key == kShelfItemDetailsKey) { |
| 727 wm_property = WmWindowProperty::SHELF_ITEM_DETAILS; |
713 } else if (key == aura::client::kTopViewInset) { | 728 } else if (key == aura::client::kTopViewInset) { |
714 wm_property = WmWindowProperty::TOP_VIEW_INSET; | 729 wm_property = WmWindowProperty::TOP_VIEW_INSET; |
715 } else if (key == aura::client::kExcludeFromMruKey) { | 730 } else if (key == aura::client::kExcludeFromMruKey) { |
716 wm_property = WmWindowProperty::EXCLUDE_FROM_MRU; | 731 wm_property = WmWindowProperty::EXCLUDE_FROM_MRU; |
717 } else { | 732 } else { |
718 return; | 733 return; |
719 } | 734 } |
720 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 735 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
721 OnWindowPropertyChanged(this, wm_property)); | 736 OnWindowPropertyChanged(this, wm_property)); |
722 } | 737 } |
(...skipping 23 matching lines...) Expand all Loading... |
746 bool visible) { | 761 bool visible) { |
747 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 762 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
748 OnWindowVisibilityChanged(this, visible)); | 763 OnWindowVisibilityChanged(this, visible)); |
749 } | 764 } |
750 | 765 |
751 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { | 766 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { |
752 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); | 767 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); |
753 } | 768 } |
754 | 769 |
755 } // namespace ash | 770 } // namespace ash |
OLD | NEW |