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_CONTROLLER_H_ | 5 #ifndef UI_AURA_SHELL_SHELF_LAYOUT_CONTROLLER_H_ |
6 #define UI_AURA_SHELL_SHELF_LAYOUT_CONTROLLER_H_ | 6 #define UI_AURA_SHELL_SHELF_LAYOUT_CONTROLLER_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/gfx/compositor/layer_animation_observer.h" | 11 #include "ui/gfx/compositor/layer_animation_observer.h" |
12 #include "ui/gfx/insets.h" | 12 #include "ui/gfx/insets.h" |
13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class Widget; | 16 class Widget; |
17 } | 17 } |
18 | 18 |
19 namespace aura_shell { | 19 namespace aura_shell { |
20 namespace internal { | 20 namespace internal { |
21 | 21 |
22 // ShelfLayoutController is responsible for showing and hiding the launcher and | 22 // ShelfLayoutController is responsible for showing and hiding the launcher and |
23 // status area as well as positioning them. | 23 // status area as well as positioning them. |
24 class ShelfLayoutController : public ui::LayerAnimationObserver { | 24 class ShelfLayoutController : public ui::LayerAnimationObserver { |
25 public: | 25 public: |
26 ShelfLayoutController(views::Widget* launcher, | 26 ShelfLayoutController(views::Widget* launcher, |
27 views::Widget* status); | 27 views::Widget* status); |
28 virtual ~ShelfLayoutController(); | 28 virtual ~ShelfLayoutController(); |
29 | 29 |
30 views::Widget* status() { return status_; } | |
stevenjb
2011/11/17 19:24:49
nit: can we rename this status_widget_ (or status_
Daniel Erat
2011/11/17 20:51:01
Sure, this was bugging me too. Done.
| |
31 | |
30 // Stops any animations and sets the bounds of the launcher and status | 32 // Stops any animations and sets the bounds of the launcher and status |
31 // widgets. | 33 // widgets. |
32 void LayoutShelf(); | 34 void LayoutShelf(); |
33 | 35 |
34 // Sets the visbility of the shelf to |visible|. | 36 // Sets the visbility of the shelf to |visible|. |
35 void SetVisible(bool visible); | 37 void SetVisible(bool visible); |
36 | 38 |
37 private: | 39 private: |
38 struct TargetBounds { | 40 struct TargetBounds { |
39 gfx::Rect launcher_bounds; | 41 gfx::Rect launcher_bounds; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 views::Widget* launcher_; | 76 views::Widget* launcher_; |
75 views::Widget* status_; | 77 views::Widget* status_; |
76 | 78 |
77 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutController); | 79 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutController); |
78 }; | 80 }; |
79 | 81 |
80 } // namespace internal | 82 } // namespace internal |
81 } // namespace aura_shell | 83 } // namespace aura_shell |
82 | 84 |
83 #endif // UI_AURA_SHELL_SHELF_LAYOUT_CONTROLLER_H_ | 85 #endif // UI_AURA_SHELL_SHELF_LAYOUT_CONTROLLER_H_ |
OLD | NEW |