| 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/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
| 9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
| 10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 bool value, BackgroundAnimatorChangeType change_type) { | 383 bool value, BackgroundAnimatorChangeType change_type) { |
| 384 hide_background_animator_.SetPaintsBackground(value, change_type); | 384 hide_background_animator_.SetPaintsBackground(value, change_type); |
| 385 } | 385 } |
| 386 | 386 |
| 387 void TrayBackgroundView::SetContentsBackground() { | 387 void TrayBackgroundView::SetContentsBackground() { |
| 388 background_ = new TrayBackground(this); | 388 background_ = new TrayBackground(this); |
| 389 tray_container_->set_background(background_); | 389 tray_container_->set_background(background_); |
| 390 } | 390 } |
| 391 | 391 |
| 392 ShelfLayoutManager* TrayBackgroundView::GetShelfLayoutManager() { | 392 ShelfLayoutManager* TrayBackgroundView::GetShelfLayoutManager() { |
| 393 return ShelfLayoutManager::ForShelf(GetWidget()->GetNativeView()); | 393 return status_area_widget()->shelf_widget()->shelf_layout_manager(); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void TrayBackgroundView::SetShelfAlignment(ShelfAlignment alignment) { | 396 void TrayBackgroundView::SetShelfAlignment(ShelfAlignment alignment) { |
| 397 shelf_alignment_ = alignment; | 397 shelf_alignment_ = alignment; |
| 398 SetTrayBorder(); | 398 SetTrayBorder(); |
| 399 tray_container_->SetAlignment(alignment); | 399 tray_container_->SetAlignment(alignment); |
| 400 } | 400 } |
| 401 | 401 |
| 402 void TrayBackgroundView::SetTrayBorder() { | 402 void TrayBackgroundView::SetTrayBorder() { |
| 403 views::View* parent = status_area_widget_->status_area_widget_delegate(); | 403 views::View* parent = status_area_widget_->status_area_widget_delegate(); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 background_->set_alpha(kTrayBackgroundAlpha); | 591 background_->set_alpha(kTrayBackgroundAlpha); |
| 592 SchedulePaint(); | 592 SchedulePaint(); |
| 593 } | 593 } |
| 594 | 594 |
| 595 void TrayBackgroundView::UpdateBubbleViewArrow( | 595 void TrayBackgroundView::UpdateBubbleViewArrow( |
| 596 views::TrayBubbleView* bubble_view) { | 596 views::TrayBubbleView* bubble_view) { |
| 597 // Nothing to do here. | 597 // Nothing to do here. |
| 598 } | 598 } |
| 599 | 599 |
| 600 } // namespace ash | 600 } // namespace ash |
| OLD | NEW |