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/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/metrics/user_metrics_recorder.h" | 8 #include "ash/metrics/user_metrics_recorder.h" |
9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 system_bubble_->bubble()->RestartAutoCloseTimer(); | 659 system_bubble_->bubble()->RestartAutoCloseTimer(); |
660 } | 660 } |
661 | 661 |
662 base::string16 SystemTray::GetAccessibleNameForBubble() { | 662 base::string16 SystemTray::GetAccessibleNameForBubble() { |
663 return GetAccessibleNameForTray(); | 663 return GetAccessibleNameForTray(); |
664 } | 664 } |
665 | 665 |
666 gfx::Rect SystemTray::GetAnchorRect( | 666 gfx::Rect SystemTray::GetAnchorRect( |
667 views::Widget* anchor_widget, | 667 views::Widget* anchor_widget, |
668 TrayBubbleView::AnchorType anchor_type, | 668 TrayBubbleView::AnchorType anchor_type, |
669 TrayBubbleView::AnchorAlignment anchor_alignment) { | 669 TrayBubbleView::AnchorAlignment anchor_alignment) const { |
670 return GetBubbleAnchorRect(anchor_widget, anchor_type, anchor_alignment); | 670 return GetBubbleAnchorRect(anchor_widget, anchor_type, anchor_alignment); |
671 } | 671 } |
672 | 672 |
673 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { | 673 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { |
674 HideBubbleWithView(bubble_view); | 674 HideBubbleWithView(bubble_view); |
675 } | 675 } |
676 | 676 |
677 views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) { | 677 views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) { |
678 std::map<SystemTrayItem*, views::View*>::iterator it = | 678 std::map<SystemTrayItem*, views::View*>::iterator it = |
679 tray_item_map_.find(item); | 679 tray_item_map_.find(item); |
(...skipping 28 matching lines...) Expand all Loading... |
708 system_bubble_.reset(); | 708 system_bubble_.reset(); |
709 // When closing a system bubble with the alternate shelf layout, we need to | 709 // When closing a system bubble with the alternate shelf layout, we need to |
710 // turn off the active tinting of the shelf. | 710 // turn off the active tinting of the shelf. |
711 if (full_system_tray_menu_) { | 711 if (full_system_tray_menu_) { |
712 SetDrawBackgroundAsActive(false); | 712 SetDrawBackgroundAsActive(false); |
713 full_system_tray_menu_ = false; | 713 full_system_tray_menu_ = false; |
714 } | 714 } |
715 } | 715 } |
716 | 716 |
717 } // namespace ash | 717 } // namespace ash |
OLD | NEW |