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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 return; | 284 return; |
285 } | 285 } |
286 | 286 |
287 NOTREACHED(); | 287 NOTREACHED(); |
288 } | 288 } |
289 | 289 |
290 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() { | 290 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() { |
291 return window_->GetProperty(kShelfItemDetailsKey); | 291 return window_->GetProperty(kShelfItemDetailsKey); |
292 } | 292 } |
293 | 293 |
| 294 void WmWindowAura::SetShelfItemDetails(const ShelfItemDetails& details) { |
| 295 // |item_details| is owned by |window_|. |
| 296 ShelfItemDetails* item_details = new ShelfItemDetails(details); |
| 297 window_->SetProperty(kShelfItemDetailsKey, item_details); |
| 298 } |
| 299 |
| 300 void WmWindowAura::ClearShelfItemDetails() { |
| 301 window_->ClearProperty(kShelfItemDetailsKey); |
| 302 } |
| 303 |
294 const wm::WindowState* WmWindowAura::GetWindowState() const { | 304 const wm::WindowState* WmWindowAura::GetWindowState() const { |
295 return ash::wm::GetWindowState(window_); | 305 return ash::wm::GetWindowState(window_); |
296 } | 306 } |
297 | 307 |
298 WmWindow* WmWindowAura::GetToplevelWindow() { | 308 WmWindow* WmWindowAura::GetToplevelWindow() { |
299 return Get(window_->GetToplevelWindow()); | 309 return Get(window_->GetToplevelWindow()); |
300 } | 310 } |
301 | 311 |
302 WmWindow* WmWindowAura::GetToplevelWindowForFocus() { | 312 WmWindow* WmWindowAura::GetToplevelWindowForFocus() { |
303 return Get(::wm::GetToplevelWindow(window_)); | 313 return Get(::wm::GetToplevelWindow(window_)); |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 bool visible) { | 771 bool visible) { |
762 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 772 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
763 OnWindowVisibilityChanged(this, visible)); | 773 OnWindowVisibilityChanged(this, visible)); |
764 } | 774 } |
765 | 775 |
766 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { | 776 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { |
767 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); | 777 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); |
768 } | 778 } |
769 | 779 |
770 } // namespace ash | 780 } // namespace ash |
OLD | NEW |