| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ash/wm/aura/aura_layout_manager_adapter.h" |
| 6 |
| 7 #include "ash/wm/aura/wm_window_aura.h" |
| 8 #include "ash/wm/common/wm_layout_manager.h" |
| 9 |
| 10 namespace ash { |
| 11 namespace wm { |
| 12 |
| 13 AuraLayoutManagerAdapter::AuraLayoutManagerAdapter( |
| 14 std::unique_ptr<WmLayoutManager> wm_layout_manager) |
| 15 : wm_layout_manager_(std::move(wm_layout_manager)) {} |
| 16 |
| 17 AuraLayoutManagerAdapter::~AuraLayoutManagerAdapter() {} |
| 18 |
| 19 void AuraLayoutManagerAdapter::OnWindowResized() { |
| 20 wm_layout_manager_->OnWindowResized(); |
| 21 } |
| 22 |
| 23 void AuraLayoutManagerAdapter::OnWindowAddedToLayout(aura::Window* child) { |
| 24 wm_layout_manager_->OnWindowAddedToLayout(WmWindowAura::Get(child)); |
| 25 } |
| 26 |
| 27 void AuraLayoutManagerAdapter::OnWillRemoveWindowFromLayout( |
| 28 aura::Window* child) { |
| 29 wm_layout_manager_->OnWillRemoveWindowFromLayout(WmWindowAura::Get(child)); |
| 30 } |
| 31 |
| 32 void AuraLayoutManagerAdapter::OnWindowRemovedFromLayout(aura::Window* child) { |
| 33 wm_layout_manager_->OnWindowRemovedFromLayout(WmWindowAura::Get(child)); |
| 34 } |
| 35 |
| 36 void AuraLayoutManagerAdapter::OnChildWindowVisibilityChanged( |
| 37 aura::Window* child, |
| 38 bool visible) { |
| 39 wm_layout_manager_->OnChildWindowVisibilityChanged(WmWindowAura::Get(child), |
| 40 visible); |
| 41 } |
| 42 |
| 43 void AuraLayoutManagerAdapter::SetChildBounds( |
| 44 aura::Window* child, |
| 45 const gfx::Rect& requested_bounds) { |
| 46 wm_layout_manager_->SetChildBounds(WmWindowAura::Get(child), |
| 47 requested_bounds); |
| 48 } |
| 49 |
| 50 } // namespace wm |
| 51 } // namespace ash |
| OLD | NEW |