OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_AURA_SHELL_SHELF_LAYOUT_MANAGER_H_ | 5 #ifndef UI_AURA_SHELL_SHELF_LAYOUT_MANAGER_H_ |
6 #define UI_AURA_SHELL_SHELF_LAYOUT_MANAGER_H_ | 6 #define UI_AURA_SHELL_SHELF_LAYOUT_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "ui/aura/layout_manager.h" | 11 #include "ui/aura/layout_manager.h" |
12 #include "ui/aura_shell/aura_shell_export.h" | 12 #include "ui/aura_shell/aura_shell_export.h" |
13 #include "ui/gfx/compositor/layer_animation_observer.h" | 13 #include "ui/gfx/compositor/layer_animation_observer.h" |
14 #include "ui/gfx/insets.h" | 14 #include "ui/gfx/insets.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 | 16 |
17 namespace views { | 17 namespace views { |
18 class Widget; | 18 class Widget; |
19 } | 19 } |
20 | 20 |
21 namespace aura_shell { | 21 namespace aura_shell { |
22 namespace internal { | 22 namespace internal { |
23 | 23 |
24 // ShelfLayoutManager is a layout manager responsible for the launcher. | 24 // ShelfLayoutManager is the layout manager responsible for the launcher and |
25 // Also supports showing and hiding the launcher/status area | 25 // status widgets. The launcher is given the total available width and told the |
26 // as well as positioning them. | 26 // width of the status area. This allows the launcher to draw the background and |
27 // Exported for unit tests. | 27 // layout to the status area. |
| 28 // To respond to bounds changes in the status area StatusAreaLayoutManager works |
| 29 // closely with ShelfLayoutManager. |
28 class AURA_SHELL_EXPORT ShelfLayoutManager : public aura::LayoutManager, | 30 class AURA_SHELL_EXPORT ShelfLayoutManager : public aura::LayoutManager, |
29 public ui::LayerAnimationObserver { | 31 public ui::LayerAnimationObserver { |
30 public: | 32 public: |
31 ShelfLayoutManager(views::Widget* launcher, views::Widget* status); | 33 ShelfLayoutManager(views::Widget* launcher, views::Widget* status); |
32 virtual ~ShelfLayoutManager(); | 34 virtual ~ShelfLayoutManager(); |
33 | 35 |
34 bool in_layout() const { return in_layout_; } | 36 bool in_layout() const { return in_layout_; } |
35 | 37 |
36 // Stops any animations and sets the bounds of the launcher and status | 38 // Stops any animations and sets the bounds of the launcher and status |
37 // widgets. | 39 // widgets. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 views::Widget* launcher_; | 102 views::Widget* launcher_; |
101 views::Widget* status_; | 103 views::Widget* status_; |
102 | 104 |
103 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 105 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
104 }; | 106 }; |
105 | 107 |
106 } // namespace internal | 108 } // namespace internal |
107 } // namespace aura_shell | 109 } // namespace aura_shell |
108 | 110 |
109 #endif // UI_AURA_SHELL_SHELF_LAYOUT_MANAGER_H_ | 111 #endif // UI_AURA_SHELL_SHELF_LAYOUT_MANAGER_H_ |
OLD | NEW |