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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 background_->set_color(kTrayBackgroundPressedColor); | 574 background_->set_color(kTrayBackgroundPressedColor); |
575 else if (hovered_) | 575 else if (hovered_) |
576 background_->set_alpha(kTrayBackgroundHoverAlpha); | 576 background_->set_alpha(kTrayBackgroundHoverAlpha); |
577 else | 577 else |
578 background_->set_alpha(kTrayBackgroundAlpha); | 578 background_->set_alpha(kTrayBackgroundAlpha); |
579 SchedulePaint(); | 579 SchedulePaint(); |
580 } | 580 } |
581 | 581 |
582 void TrayBackgroundView::UpdateBubbleViewArrow( | 582 void TrayBackgroundView::UpdateBubbleViewArrow( |
583 views::TrayBubbleView* bubble_view) { | 583 views::TrayBubbleView* bubble_view) { |
| 584 if (switches::UseAlternateShelfLayout()) |
| 585 return; |
| 586 |
584 aura::RootWindow* root_window = | 587 aura::RootWindow* root_window = |
585 bubble_view->GetWidget()->GetNativeView()->GetRootWindow(); | 588 bubble_view->GetWidget()->GetNativeView()->GetRootWindow(); |
586 ash::internal::ShelfLayoutManager* shelf = | 589 ash::internal::ShelfLayoutManager* shelf = |
587 ShelfLayoutManager::ForLauncher(root_window); | 590 ShelfLayoutManager::ForLauncher(root_window); |
588 bubble_view->SetArrowPaintType( | 591 bubble_view->SetArrowPaintType( |
589 shelf->IsVisible() ? views::BubbleBorder::PAINT_NORMAL : | 592 shelf->IsVisible() ? views::BubbleBorder::PAINT_NORMAL : |
590 views::BubbleBorder::PAINT_TRANSPARENT); | 593 views::BubbleBorder::PAINT_TRANSPARENT); |
591 } | 594 } |
592 | 595 |
593 } // namespace internal | 596 } // namespace internal |
594 } // namespace ash | 597 } // namespace ash |
OLD | NEW |