| 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/shelf/shelf_util.h" | 10 #include "ash/shelf/shelf_util.h" |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 if (alignment == shelf_alignment()) | 612 if (alignment == shelf_alignment()) |
| 613 return; | 613 return; |
| 614 TrayBackgroundView::SetShelfAlignment(alignment); | 614 TrayBackgroundView::SetShelfAlignment(alignment); |
| 615 UpdateAfterShelfAlignmentChange(alignment); | 615 UpdateAfterShelfAlignmentChange(alignment); |
| 616 // Destroy any existing bubble so that it is rebuilt correctly. | 616 // Destroy any existing bubble so that it is rebuilt correctly. |
| 617 CloseSystemBubbleAndDeactivateSystemTray(); | 617 CloseSystemBubbleAndDeactivateSystemTray(); |
| 618 // Rebuild any notification bubble. | 618 // Rebuild any notification bubble. |
| 619 if (notification_bubble_) { | 619 if (notification_bubble_) { |
| 620 notification_bubble_.reset(); | 620 notification_bubble_.reset(); |
| 621 UpdateNotificationBubble(); | 621 UpdateNotificationBubble(); |
| 622 // UpdateWebNotifications() should be called in UpdateNotificationBubble(). |
| 623 } else if (!hide_notifications_) { |
| 624 UpdateWebNotifications(); |
| 622 } | 625 } |
| 623 } | 626 } |
| 624 | 627 |
| 625 void SystemTray::AnchorUpdated() { | 628 void SystemTray::AnchorUpdated() { |
| 626 if (notification_bubble_) { | 629 if (notification_bubble_) { |
| 627 notification_bubble_->bubble_view()->UpdateBubble(); | 630 notification_bubble_->bubble_view()->UpdateBubble(); |
| 628 // Ensure that the notification buble is above the shelf/status area. | 631 // Ensure that the notification buble is above the shelf/status area. |
| 629 notification_bubble_->bubble_view()->GetWidget()->StackAtTop(); | 632 notification_bubble_->bubble_view()->GetWidget()->StackAtTop(); |
| 630 UpdateBubbleViewArrow(notification_bubble_->bubble_view()); | 633 UpdateBubbleViewArrow(notification_bubble_->bubble_view()); |
| 631 } | 634 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 system_bubble_.reset(); | 726 system_bubble_.reset(); |
| 724 // When closing a system bubble with the alternate shelf layout, we need to | 727 // When closing a system bubble with the alternate shelf layout, we need to |
| 725 // turn off the active tinting of the shelf. | 728 // turn off the active tinting of the shelf. |
| 726 if (full_system_tray_menu_) { | 729 if (full_system_tray_menu_) { |
| 727 SetDrawBackgroundAsActive(false); | 730 SetDrawBackgroundAsActive(false); |
| 728 full_system_tray_menu_ = false; | 731 full_system_tray_menu_ = false; |
| 729 } | 732 } |
| 730 } | 733 } |
| 731 | 734 |
| 732 } // namespace ash | 735 } // namespace ash |
| OLD | NEW |