Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / ash / wm / root_window_layout_manager.h
blob708e306b75b24b1e693cf303e85eb8031fbbe769
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.
5 #ifndef ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
6 #define ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
8 #include "ash/shell_window_ids.h"
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "ui/aura/layout_manager.h"
14 namespace aura {
15 class Window;
17 namespace gfx {
18 class Rect;
20 namespace ui {
21 class Layer;
23 namespace views {
24 class Widget;
27 namespace ash {
28 namespace internal {
30 // A layout manager for the root window.
31 // Resizes all of its immediate children to fill the bounds of the root window.
32 class RootWindowLayoutManager : public aura::LayoutManager {
33 public:
34 explicit RootWindowLayoutManager(aura::Window* owner);
35 virtual ~RootWindowLayoutManager();
37 // Overridden from aura::LayoutManager:
38 virtual void OnWindowResized() OVERRIDE;
39 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
40 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
41 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
42 virtual void OnChildWindowVisibilityChanged(aura::Window* child,
43 bool visible) OVERRIDE;
44 virtual void SetChildBounds(aura::Window* child,
45 const gfx::Rect& requested_bounds) OVERRIDE;
47 private:
48 aura::Window* owner_;
50 DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager);
53 } // namespace internal
54 } // namespace ash
56 #endif // ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_