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/common/wm_window.h" | 5 #include "ash/common/wm_window.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_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
9 #include "ash/common/ash_constants.h" | 9 #include "ash/common/ash_constants.h" |
10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 const gfx::Rect& WmWindow::GetBounds() const { | 459 const gfx::Rect& WmWindow::GetBounds() const { |
460 return window_->bounds(); | 460 return window_->bounds(); |
461 } | 461 } |
462 | 462 |
463 gfx::Rect WmWindow::GetTargetBounds() { | 463 gfx::Rect WmWindow::GetTargetBounds() { |
464 return window_->GetTargetBounds(); | 464 return window_->GetTargetBounds(); |
465 } | 465 } |
466 | 466 |
467 void WmWindow::ClearRestoreBounds() { | 467 void WmWindow::ClearRestoreBounds() { |
468 window_->ClearProperty(aura::client::kRestoreBoundsKey); | 468 window_->ClearProperty(aura::client::kRestoreBoundsKey); |
| 469 window_->ClearProperty(aura::client::kVirtualKeyboardRestoreBoundsKey); |
469 } | 470 } |
470 | 471 |
471 void WmWindow::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { | 472 void WmWindow::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { |
472 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); | 473 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); |
473 } | 474 } |
474 | 475 |
475 gfx::Rect WmWindow::GetRestoreBoundsInScreen() const { | 476 gfx::Rect WmWindow::GetRestoreBoundsInScreen() const { |
476 gfx::Rect* bounds = window_->GetProperty(aura::client::kRestoreBoundsKey); | 477 gfx::Rect* bounds = window_->GetProperty(aura::client::kRestoreBoundsKey); |
477 return bounds ? *bounds : gfx::Rect(); | 478 return bounds ? *bounds : gfx::Rect(); |
478 } | 479 } |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 observer.OnTransientChildAdded(this, Get(transient)); | 789 observer.OnTransientChildAdded(this, Get(transient)); |
789 } | 790 } |
790 | 791 |
791 void WmWindow::OnTransientChildRemoved(aura::Window* window, | 792 void WmWindow::OnTransientChildRemoved(aura::Window* window, |
792 aura::Window* transient) { | 793 aura::Window* transient) { |
793 for (auto& observer : transient_observers_) | 794 for (auto& observer : transient_observers_) |
794 observer.OnTransientChildRemoved(this, Get(transient)); | 795 observer.OnTransientChildRemoved(this, Get(transient)); |
795 } | 796 } |
796 | 797 |
797 } // namespace ash | 798 } // namespace ash |
OLD | NEW |