Chromium Code Reviews| 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/system/status_area_widget_delegate.h" | 5 #include "ash/system/status_area_widget_delegate.h" |
| 6 | 6 |
| 7 #include "ash/ash_export.h" | 7 #include "ash/ash_export.h" |
| 8 #include "ash/common/ash_switches.h" | 8 #include "ash/common/ash_switches.h" |
| 9 #include "ash/common/focus_cycler.h" | 9 #include "ash/common/focus_cycler.h" |
| 10 #include "ash/common/material_design/material_design_controller.h" | 10 #include "ash/common/material_design/material_design_controller.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 is_first_visible_child = false; | 156 is_first_visible_child = false; |
| 157 layout->StartRow(0, 0); | 157 layout->StartRow(0, 0); |
| 158 layout->AddView(child); | 158 layout->AddView(child); |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 layer()->GetAnimator()->StopAnimating(); | 162 layer()->GetAnimator()->StopAnimating(); |
| 163 StatusAreaWidgetDelegateAnimationSettings settings(layer()); | 163 StatusAreaWidgetDelegateAnimationSettings settings(layer()); |
| 164 | 164 |
| 165 Layout(); | 165 Layout(); |
| 166 View::InvalidateLayout(); | |
|
James Cook
2016/06/29 21:23:37
It seems a little weird to call View::Layout() the
| |
| 166 UpdateWidgetSize(); | 167 UpdateWidgetSize(); |
| 167 } | 168 } |
| 168 | 169 |
| 169 void StatusAreaWidgetDelegate::ChildPreferredSizeChanged(View* child) { | 170 void StatusAreaWidgetDelegate::ChildPreferredSizeChanged(View* child) { |
| 170 // Need to resize the window when trays or items are added/removed. | 171 // Need to resize the window when trays or items are added/removed. |
| 171 StatusAreaWidgetDelegateAnimationSettings settings(layer()); | 172 StatusAreaWidgetDelegateAnimationSettings settings(layer()); |
| 172 UpdateWidgetSize(); | 173 UpdateWidgetSize(); |
| 173 } | 174 } |
| 174 | 175 |
| 175 void StatusAreaWidgetDelegate::ChildVisibilityChanged(View* child) { | 176 void StatusAreaWidgetDelegate::ChildVisibilityChanged(View* child) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 222 bottom_edge = | 223 bottom_edge = |
| 223 on_edge ? GetTrayConstant(TRAY_PADDING_FROM_EDGE_OF_SHELF) : 0; | 224 on_edge ? GetTrayConstant(TRAY_PADDING_FROM_EDGE_OF_SHELF) : 0; |
| 224 right_edge = shelf_size - kShelfItemInset - item_height; | 225 right_edge = shelf_size - kShelfItemInset - item_height; |
| 225 } | 226 } |
| 226 } | 227 } |
| 227 child->SetBorder(views::Border::CreateEmptyBorder(top_edge, left_edge, | 228 child->SetBorder(views::Border::CreateEmptyBorder(top_edge, left_edge, |
| 228 bottom_edge, right_edge)); | 229 bottom_edge, right_edge)); |
| 229 } | 230 } |
| 230 | 231 |
| 231 } // namespace ash | 232 } // namespace ash |
| OLD | NEW |