OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "ash/wm/status_area_layout_manager.h" | 5 #include "ash/wm/status_area_layout_manager.h" |
6 | 6 |
| 7 #include "ash/shelf/shelf_layout_manager.h" |
| 8 #include "ash/shelf/shelf_widget.h" |
7 #include "ash/system/status_area_widget.h" | 9 #include "ash/system/status_area_widget.h" |
8 #include "ash/wm/shelf_layout_manager.h" | |
9 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
10 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
11 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
12 | 13 |
13 namespace ash { | 14 namespace ash { |
14 namespace internal { | 15 namespace internal { |
15 | 16 |
16 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
17 // StatusAreaLayoutManager, public: | 18 // StatusAreaLayoutManager, public: |
18 | 19 |
19 StatusAreaLayoutManager::StatusAreaLayoutManager(ShelfLayoutManager* shelf) | 20 StatusAreaLayoutManager::StatusAreaLayoutManager(ShelfWidget* shelf) |
20 : in_layout_(false), | 21 : in_layout_(false), |
21 shelf_(shelf) { | 22 shelf_(shelf) { |
22 } | 23 } |
23 | 24 |
24 StatusAreaLayoutManager::~StatusAreaLayoutManager() { | 25 StatusAreaLayoutManager::~StatusAreaLayoutManager() { |
25 } | 26 } |
26 | 27 |
27 //////////////////////////////////////////////////////////////////////////////// | 28 //////////////////////////////////////////////////////////////////////////////// |
28 // StatusAreaLayoutManager, aura::LayoutManager implementation: | 29 // StatusAreaLayoutManager, aura::LayoutManager implementation: |
29 | 30 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 63 |
63 SetChildBoundsDirect(child, requested_bounds); | 64 SetChildBoundsDirect(child, requested_bounds); |
64 LayoutStatusArea(); | 65 LayoutStatusArea(); |
65 } | 66 } |
66 | 67 |
67 //////////////////////////////////////////////////////////////////////////////// | 68 //////////////////////////////////////////////////////////////////////////////// |
68 // StatusAreaLayoutManager, private: | 69 // StatusAreaLayoutManager, private: |
69 | 70 |
70 void StatusAreaLayoutManager::LayoutStatusArea() { | 71 void StatusAreaLayoutManager::LayoutStatusArea() { |
71 // Shelf layout manager may be already doing layout. | 72 // Shelf layout manager may be already doing layout. |
72 if (shelf_->in_layout()) | 73 if (shelf_->shelf_layout_manager()->in_layout()) |
73 return; | 74 return; |
74 | 75 |
75 base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true); | 76 base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true); |
76 shelf_->LayoutShelf(); | 77 shelf_->shelf_layout_manager()->LayoutShelf(); |
77 } | 78 } |
78 | 79 |
79 } // namespace internal | 80 } // namespace internal |
80 } // namespace ash | 81 } // namespace ash |
OLD | NEW |