OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 BLIMP_ENGINE_APP_UI_BLIMP_LAYOUT_MANAGER_H_ | |
6 #define BLIMP_ENGINE_APP_UI_BLIMP_LAYOUT_MANAGER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "ui/aura/layout_manager.h" | |
10 | |
11 namespace blimp { | |
12 namespace engine { | |
13 | |
14 // A layout manager that sets the child window to occupy the full area of the | |
15 // root window. | |
16 class BlimpLayoutManager : public aura::LayoutManager { | |
17 public: | |
18 // Caller retains the ownership of |root_window|. | |
19 explicit BlimpLayoutManager(aura::Window* root_window); | |
20 ~BlimpLayoutManager() override; | |
21 | |
22 private: | |
23 // aura::LayoutManager implementation. | |
24 void OnWindowResized() override; | |
25 void OnWindowAddedToLayout(aura::Window* child) override; | |
26 void OnWillRemoveWindowFromLayout(aura::Window* child) override; | |
27 void OnWindowRemovedFromLayout(aura::Window* child) override; | |
28 void OnChildWindowVisibilityChanged(aura::Window* child, | |
29 bool visible) override; | |
30 void SetChildBounds(aura::Window* child, | |
31 const gfx::Rect& requested_bounds) override; | |
32 | |
33 aura::Window* root_window_; | |
34 | |
35 DISALLOW_COPY_AND_ASSIGN(BlimpLayoutManager); | |
36 }; | |
37 | |
38 } // namespace engine | |
39 } // namespace blimp | |
40 | |
41 #endif // BLIMP_ENGINE_APP_UI_BLIMP_LAYOUT_MANAGER_H_ | |
OLD | NEW |