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_TOPLEVEL_LAYOUT_MANAGER_H_
6 #define ASH_WM_TOPLEVEL_LAYOUT_MANAGER_H_
9 #include "ash/ash_export.h"
10 #include "ash/wm/base_layout_manager.h"
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
17 class ShelfLayoutManager
;
19 // ToplevelLayoutManager is the LayoutManager installed on a container that
20 // hosts what the shell considers to be top-level windows.
22 // ToplevelLayoutManager is used if the WorkspaceManager is not enabled and
23 // compact window mode is not enabled. It is intended to implement the simplest
24 // possible window management code. If you have a more complex window mode
25 // please implement a new LayoutManager for it.
26 class ASH_EXPORT ToplevelLayoutManager
: public BaseLayoutManager
{
28 ToplevelLayoutManager();
29 virtual ~ToplevelLayoutManager();
31 void set_shelf(ShelfLayoutManager
* shelf
) { shelf_
= shelf
; }
33 // LayoutManager overrides:
34 virtual void OnWindowAddedToLayout(aura::Window
* child
) OVERRIDE
;
35 virtual void OnWillRemoveWindowFromLayout(aura::Window
* child
) OVERRIDE
;
36 virtual void OnChildWindowVisibilityChanged(aura::Window
* child
,
37 bool visibile
) OVERRIDE
;
38 virtual void SetChildBounds(aura::Window
* child
,
39 const gfx::Rect
& requested_bounds
) OVERRIDE
;
41 // WindowObserver overrides:
42 virtual void OnWindowPropertyChanged(aura::Window
* window
,
44 intptr_t old
) OVERRIDE
;
47 // Updates the visibility of the shelf based on if there are any full screen
49 void UpdateShelfVisibility();
51 // Owned by the Shell container window LauncherContainer. May be NULL if
52 // we're not using a shelf.
53 ShelfLayoutManager
* shelf_
;
55 DISALLOW_COPY_AND_ASSIGN(ToplevelLayoutManager
);
59 } // namespace internal
61 #endif // ASH_WM_TOPLEVEL_LAYOUT_MANAGER_H_