Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 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 UI_AURA_DESKTOP_DESKTOP_LAYOUT_MANAGER_H_ | |
|
Ben Goodger (Google)
2012/09/19 21:29:23
put this file in ui/views/widget/ alongside the ot
| |
| 6 #define UI_AURA_DESKTOP_DESKTOP_LAYOUT_MANAGER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "ui/aura/aura_export.h" | |
| 11 #include "ui/aura/layout_manager.h" | |
| 12 | |
| 13 namespace aura { | |
| 14 class RootWindow; | |
| 15 class Window; | |
| 16 | |
| 17 // A LayoutManager that by default makes the first Window added to a | |
| 18 // RootWindow the full size, and will be resized as the RootWindow is resized. | |
| 19 class AURA_EXPORT DesktopLayoutManager : public LayoutManager { | |
| 20 public: | |
| 21 DesktopLayoutManager(RootWindow* root_window); | |
|
Ben Goodger (Google)
2012/09/19 21:29:23
explicit
| |
| 22 virtual ~DesktopLayoutManager(); | |
| 23 | |
| 24 // Overridden from aura::LayoutManager: | |
| 25 virtual void OnWindowResized() OVERRIDE; | |
| 26 virtual void OnWindowAddedToLayout(Window* child) OVERRIDE; | |
| 27 virtual void OnWillRemoveWindowFromLayout(Window* child) OVERRIDE; | |
| 28 virtual void OnWindowRemovedFromLayout(Window* child) OVERRIDE; | |
| 29 virtual void OnChildWindowVisibilityChanged(Window* child, | |
| 30 bool visible) OVERRIDE; | |
| 31 virtual void SetChildBounds(Window* child, | |
| 32 const gfx::Rect& requested_bounds) OVERRIDE; | |
| 33 | |
| 34 private: | |
| 35 // Sets the size of |main_window_| to the internal bounds of |root_window_|. | |
| 36 void SetMainWindowSize(); | |
| 37 | |
| 38 RootWindow* root_window_; | |
| 39 Window* main_window_; | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(DesktopLayoutManager); | |
| 42 }; | |
| 43 | |
| 44 } // namespace aura | |
| 45 | |
| 46 #endif // UI_AURA_DESKTOP_DESKTOP_LAYOUT_MANAGER_H_ | |
| OLD | NEW |