| 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 #ifndef ASH_WM_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_ |
| 6 #define ASH_WM_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "ash/ash_export.h" |
| 11 #include "base/macros.h" |
| 12 #include "ui/aura/layout_manager.h" |
| 13 |
| 14 namespace ash { |
| 15 namespace wm { |
| 16 |
| 17 class WmLayoutManager; |
| 18 |
| 19 // AuraLayoutManagerAdapter is an aura::LayoutManager that calls to |
| 20 // WmLayoutManager. Use it when you have a WmLayoutManager you want to use |
| 21 // with an aura::Window. |
| 22 class ASH_EXPORT AuraLayoutManagerAdapter : public aura::LayoutManager { |
| 23 public: |
| 24 explicit AuraLayoutManagerAdapter( |
| 25 std::unique_ptr<WmLayoutManager> wm_layout_manager); |
| 26 ~AuraLayoutManagerAdapter() override; |
| 27 |
| 28 // aura::LayoutManager: |
| 29 void OnWindowResized() override; |
| 30 void OnWindowAddedToLayout(aura::Window* child) override; |
| 31 void OnWillRemoveWindowFromLayout(aura::Window* child) override; |
| 32 void OnWindowRemovedFromLayout(aura::Window* child) override; |
| 33 void OnChildWindowVisibilityChanged(aura::Window* child, |
| 34 bool visible) override; |
| 35 void SetChildBounds(aura::Window* child, |
| 36 const gfx::Rect& requested_bounds) override; |
| 37 |
| 38 private: |
| 39 std::unique_ptr<WmLayoutManager> wm_layout_manager_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(AuraLayoutManagerAdapter); |
| 42 }; |
| 43 |
| 44 } // namespace wm |
| 45 } // namespace ash |
| 46 |
| 47 #endif // ASH_WM_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_ |
| OLD | NEW |