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_ash.h" | 9 #include "ash/screen_ash.h" |
10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 DCHECK(!ash::switches::UseAlternateShelfLayout()); | 422 DCHECK(!ash::switches::UseAlternateShelfLayout()); |
423 hide_background_animator_.SetPaintsBackground(value, change_type); | 423 hide_background_animator_.SetPaintsBackground(value, change_type); |
424 } | 424 } |
425 | 425 |
426 void TrayBackgroundView::SetContentsBackground() { | 426 void TrayBackgroundView::SetContentsBackground() { |
427 background_ = new internal::TrayBackground(this); | 427 background_ = new internal::TrayBackground(this); |
428 tray_container_->set_background(background_); | 428 tray_container_->set_background(background_); |
429 } | 429 } |
430 | 430 |
431 ShelfLayoutManager* TrayBackgroundView::GetShelfLayoutManager() { | 431 ShelfLayoutManager* TrayBackgroundView::GetShelfLayoutManager() { |
432 return ShelfLayoutManager::ForLauncher(GetWidget()->GetNativeView()); | 432 return ShelfLayoutManager::ForShelf(GetWidget()->GetNativeView()); |
433 } | 433 } |
434 | 434 |
435 void TrayBackgroundView::SetShelfAlignment(ShelfAlignment alignment) { | 435 void TrayBackgroundView::SetShelfAlignment(ShelfAlignment alignment) { |
436 shelf_alignment_ = alignment; | 436 shelf_alignment_ = alignment; |
437 SetBorder(); | 437 SetBorder(); |
438 tray_container_->SetAlignment(alignment); | 438 tray_container_->SetAlignment(alignment); |
439 } | 439 } |
440 | 440 |
441 void TrayBackgroundView::SetBorder() { | 441 void TrayBackgroundView::SetBorder() { |
442 views::View* parent = status_area_widget_->status_area_widget_delegate(); | 442 views::View* parent = status_area_widget_->status_area_widget_delegate(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 } | 616 } |
617 | 617 |
618 void TrayBackgroundView::UpdateBubbleViewArrow( | 618 void TrayBackgroundView::UpdateBubbleViewArrow( |
619 views::TrayBubbleView* bubble_view) { | 619 views::TrayBubbleView* bubble_view) { |
620 if (switches::UseAlternateShelfLayout()) | 620 if (switches::UseAlternateShelfLayout()) |
621 return; | 621 return; |
622 | 622 |
623 aura::Window* root_window = | 623 aura::Window* root_window = |
624 bubble_view->GetWidget()->GetNativeView()->GetRootWindow(); | 624 bubble_view->GetWidget()->GetNativeView()->GetRootWindow(); |
625 ash::internal::ShelfLayoutManager* shelf = | 625 ash::internal::ShelfLayoutManager* shelf = |
626 ShelfLayoutManager::ForLauncher(root_window); | 626 ShelfLayoutManager::ForShelf(root_window); |
627 bubble_view->SetArrowPaintType( | 627 bubble_view->SetArrowPaintType( |
628 (shelf && shelf->IsVisible()) ? | 628 (shelf && shelf->IsVisible()) ? |
629 views::BubbleBorder::PAINT_NORMAL : | 629 views::BubbleBorder::PAINT_NORMAL : |
630 views::BubbleBorder::PAINT_TRANSPARENT); | 630 views::BubbleBorder::PAINT_TRANSPARENT); |
631 } | 631 } |
632 | 632 |
633 } // namespace internal | 633 } // namespace internal |
634 } // namespace ash | 634 } // namespace ash |
OLD | NEW |