OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_WM_COMPACT_STATUS_AREA_LAYOUT_MANAGER_H_ | |
6 #define ASH_WM_COMPACT_STATUS_AREA_LAYOUT_MANAGER_H_ | |
7 #pragma once | |
8 | |
9 #include "base/basictypes.h" | |
10 #include "base/compiler_specific.h" | |
11 #include "ui/aura/layout_manager.h" | |
12 | |
13 namespace views { | |
14 class Widget; | |
15 } | |
16 | |
17 namespace ash { | |
18 namespace internal { | |
19 | |
20 // CompactStatusAreaLayoutManager places the status area in the top-right | |
21 // corner of the screen. | |
22 class CompactStatusAreaLayoutManager : public aura::LayoutManager { | |
23 public: | |
24 explicit CompactStatusAreaLayoutManager(views::Widget* status_widget); | |
25 virtual ~CompactStatusAreaLayoutManager(); | |
26 | |
27 // Overridden from aura::LayoutManager: | |
28 virtual void OnWindowResized() OVERRIDE; | |
29 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; | |
30 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; | |
31 virtual void OnChildWindowVisibilityChanged(aura::Window* child, | |
32 bool visible) OVERRIDE; | |
33 virtual void SetChildBounds(aura::Window* child, | |
34 const gfx::Rect& requested_bounds) OVERRIDE; | |
35 | |
36 private: | |
37 // Place the status area widget in the corner of the screen. | |
38 void LayoutStatusArea(); | |
39 | |
40 bool in_layout_; | |
41 views::Widget* status_widget_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(CompactStatusAreaLayoutManager); | |
44 }; | |
45 | |
46 } // namespace internal | |
47 } // namespace ash | |
48 | |
49 #endif // ASH_WM_COMPACT_STATUS_AREA_LAYOUT_MANAGER_H_ | |
OLD | NEW |