| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } | 443 } |
| 444 | 444 |
| 445 ui::WindowShowState WmWindowAura::GetShowState() const { | 445 ui::WindowShowState WmWindowAura::GetShowState() const { |
| 446 return window_->GetProperty(aura::client::kShowStateKey); | 446 return window_->GetProperty(aura::client::kShowStateKey); |
| 447 } | 447 } |
| 448 | 448 |
| 449 void WmWindowAura::SetRestoreShowState(ui::WindowShowState show_state) { | 449 void WmWindowAura::SetRestoreShowState(ui::WindowShowState show_state) { |
| 450 window_->SetProperty(aura::client::kRestoreShowStateKey, show_state); | 450 window_->SetProperty(aura::client::kRestoreShowStateKey, show_state); |
| 451 } | 451 } |
| 452 | 452 |
| 453 void WmWindowAura::SetRestoreOverrides( |
| 454 const gfx::Rect& bounds_override, |
| 455 ui::WindowShowState window_state_override) { |
| 456 if (bounds_override.IsEmpty()) { |
| 457 window_->ClearProperty(kRestoreShowStateOverrideKey); |
| 458 window_->ClearProperty(kRestoreBoundsOverrideKey); |
| 459 return; |
| 460 } |
| 461 window_->SetProperty(kRestoreShowStateOverrideKey, window_state_override); |
| 462 window_->SetProperty(kRestoreBoundsOverrideKey, |
| 463 new gfx::Rect(bounds_override)); |
| 464 } |
| 465 |
| 453 void WmWindowAura::SetLockedToRoot(bool value) { | 466 void WmWindowAura::SetLockedToRoot(bool value) { |
| 454 window_->SetProperty(kStayInSameRootWindowKey, value); | 467 window_->SetProperty(kStayInSameRootWindowKey, value); |
| 455 } | 468 } |
| 456 | 469 |
| 457 void WmWindowAura::SetCapture() { | 470 void WmWindowAura::SetCapture() { |
| 458 window_->SetCapture(); | 471 window_->SetCapture(); |
| 459 } | 472 } |
| 460 | 473 |
| 461 bool WmWindowAura::HasCapture() { | 474 bool WmWindowAura::HasCapture() { |
| 462 return window_->HasCapture(); | 475 return window_->HasCapture(); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 bool visible) { | 712 bool visible) { |
| 700 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 713 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
| 701 OnWindowVisibilityChanging(this, visible)); | 714 OnWindowVisibilityChanging(this, visible)); |
| 702 } | 715 } |
| 703 | 716 |
| 704 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { | 717 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { |
| 705 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); | 718 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); |
| 706 } | 719 } |
| 707 | 720 |
| 708 } // namespace ash | 721 } // namespace ash |
| OLD | NEW |