Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 2012183002: Update cached height for popup notifications after shelf alignment changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698