Chromium Code Reviews| 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(ash::kRestoreShowStateOverrideKey); | |
|
James Cook
2016/06/27 00:19:21
nit: "ash::" not needed
sky
2016/06/27 15:27:26
Done.
| |
| 458 window_->ClearProperty(ash::kRestoreBoundsOverrideKey); | |
| 459 return; | |
| 460 } | |
| 461 window_->SetProperty(ash::kRestoreShowStateOverrideKey, | |
| 462 window_state_override); | |
| 463 window_->SetProperty(ash::kRestoreBoundsOverrideKey, | |
| 464 new gfx::Rect(bounds_override)); | |
| 465 } | |
| 466 | |
| 453 void WmWindowAura::SetLockedToRoot(bool value) { | 467 void WmWindowAura::SetLockedToRoot(bool value) { |
| 454 window_->SetProperty(kStayInSameRootWindowKey, value); | 468 window_->SetProperty(kStayInSameRootWindowKey, value); |
| 455 } | 469 } |
| 456 | 470 |
| 457 void WmWindowAura::SetCapture() { | 471 void WmWindowAura::SetCapture() { |
| 458 window_->SetCapture(); | 472 window_->SetCapture(); |
| 459 } | 473 } |
| 460 | 474 |
| 461 bool WmWindowAura::HasCapture() { | 475 bool WmWindowAura::HasCapture() { |
| 462 return window_->HasCapture(); | 476 return window_->HasCapture(); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 699 bool visible) { | 713 bool visible) { |
| 700 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 714 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
| 701 OnWindowVisibilityChanging(this, visible)); | 715 OnWindowVisibilityChanging(this, visible)); |
| 702 } | 716 } |
| 703 | 717 |
| 704 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { | 718 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { |
| 705 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); | 719 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); |
| 706 } | 720 } |
| 707 | 721 |
| 708 } // namespace ash | 722 } // namespace ash |
| OLD | NEW |