Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ash / wm / root_window_layout_manager.h
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 ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
6 #define ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_
7
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"
13
14 namespace aura {
15 class Window;
16 }
17 namespace gfx {
18 class Rect;
19 }
20 namespace ui {
21 class Layer;
22 }
23 namespace views {
24 class Widget;
25 }
26
27 namespace ash {
28
29 // A layout manager for the root window.
30 // Resizes all of its immediate children to fill the bounds of the root window.
31 class RootWindowLayoutManager : public aura::LayoutManager {
32  public:
33   explicit RootWindowLayoutManager(aura::Window* owner);
34   ~RootWindowLayoutManager() override;
35
36   // Overridden from aura::LayoutManager:
37   void OnWindowResized() override;
38   void OnWindowAddedToLayout(aura::Window* child) override;
39   void OnWillRemoveWindowFromLayout(aura::Window* child) override;
40   void OnWindowRemovedFromLayout(aura::Window* child) override;
41   void OnChildWindowVisibilityChanged(aura::Window* child,
42                                       bool visible) override;
43   void SetChildBounds(aura::Window* child,
44                       const gfx::Rect& requested_bounds) override;
45
46  private:
47   aura::Window* owner_;
48
49   DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager);
50 };
51
52 }  // namespace ash
53
54 #endif  // ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_