Chromium Code Reviews| Index: ui/aura/desktop/desktop_layout_manager.h |
| diff --git a/ui/aura/desktop/desktop_layout_manager.h b/ui/aura/desktop/desktop_layout_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8ad60755b559d5d4a9941ae8a0cfde3ad0ad9b06 |
| --- /dev/null |
| +++ b/ui/aura/desktop/desktop_layout_manager.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#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
|
| +#define UI_AURA_DESKTOP_DESKTOP_LAYOUT_MANAGER_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/compiler_specific.h" |
| +#include "ui/aura/aura_export.h" |
| +#include "ui/aura/layout_manager.h" |
| + |
| +namespace aura { |
| +class RootWindow; |
| +class Window; |
| + |
| +// A LayoutManager that by default makes the first Window added to a |
| +// RootWindow the full size, and will be resized as the RootWindow is resized. |
| +class AURA_EXPORT DesktopLayoutManager : public LayoutManager { |
| + public: |
| + DesktopLayoutManager(RootWindow* root_window); |
|
Ben Goodger (Google)
2012/09/19 21:29:23
explicit
|
| + virtual ~DesktopLayoutManager(); |
| + |
| + // Overridden from aura::LayoutManager: |
| + virtual void OnWindowResized() OVERRIDE; |
| + virtual void OnWindowAddedToLayout(Window* child) OVERRIDE; |
| + virtual void OnWillRemoveWindowFromLayout(Window* child) OVERRIDE; |
| + virtual void OnWindowRemovedFromLayout(Window* child) OVERRIDE; |
| + virtual void OnChildWindowVisibilityChanged(Window* child, |
| + bool visible) OVERRIDE; |
| + virtual void SetChildBounds(Window* child, |
| + const gfx::Rect& requested_bounds) OVERRIDE; |
| + |
| + private: |
| + // Sets the size of |main_window_| to the internal bounds of |root_window_|. |
| + void SetMainWindowSize(); |
| + |
| + RootWindow* root_window_; |
| + Window* main_window_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DesktopLayoutManager); |
| +}; |
| + |
| +} // namespace aura |
| + |
| +#endif // UI_AURA_DESKTOP_DESKTOP_LAYOUT_MANAGER_H_ |