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/tray/tray_background_view.h" | 5 #include "ash/system/tray/tray_background_view.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/screen_util.h" | 9 #include "ash/screen_util.h" |
10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 UpdateLayout(); | 222 UpdateLayout(); |
223 } | 223 } |
224 | 224 |
225 void TrayBackgroundView::TrayContainer::SetAlignment(ShelfAlignment alignment) { | 225 void TrayBackgroundView::TrayContainer::SetAlignment(ShelfAlignment alignment) { |
226 if (alignment_ == alignment) | 226 if (alignment_ == alignment) |
227 return; | 227 return; |
228 alignment_ = alignment; | 228 alignment_ = alignment; |
229 UpdateLayout(); | 229 UpdateLayout(); |
230 } | 230 } |
231 | 231 |
232 gfx::Size TrayBackgroundView::TrayContainer::GetPreferredSize() { | 232 gfx::Size TrayBackgroundView::TrayContainer::GetPreferredSize() const { |
233 if (size_.IsEmpty()) | 233 if (size_.IsEmpty()) |
234 return views::View::GetPreferredSize(); | 234 return views::View::GetPreferredSize(); |
235 return size_; | 235 return size_; |
236 } | 236 } |
237 | 237 |
238 void TrayBackgroundView::TrayContainer::ChildPreferredSizeChanged( | 238 void TrayBackgroundView::TrayContainer::ChildPreferredSizeChanged( |
239 views::View* child) { | 239 views::View* child) { |
240 PreferredSizeChanged(); | 240 PreferredSizeChanged(); |
241 } | 241 } |
242 | 242 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 background_->set_alpha(kTrayBackgroundAlpha); | 519 background_->set_alpha(kTrayBackgroundAlpha); |
520 SchedulePaint(); | 520 SchedulePaint(); |
521 } | 521 } |
522 | 522 |
523 void TrayBackgroundView::UpdateBubbleViewArrow( | 523 void TrayBackgroundView::UpdateBubbleViewArrow( |
524 views::TrayBubbleView* bubble_view) { | 524 views::TrayBubbleView* bubble_view) { |
525 // Nothing to do here. | 525 // Nothing to do here. |
526 } | 526 } |
527 | 527 |
528 } // namespace ash | 528 } // namespace ash |
OLD | NEW |