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

Unified Diff: ash/system/tray/system_tray.cc

Issue 10833041: Change web notifications to show at the top of the list, clean up layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/system/tray/tray_bubble_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 8b3cb3b373328e3db24342a14d9ad4a9c5f086ef..877c604201f5fdb42761c42b73facae2d92f0839 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -502,7 +502,7 @@ void SystemTray::UpdateNotificationBubble() {
void SystemTray::UpdateNotificationAnchor() {
if (!notification_bubble_.get())
return;
- notification_bubble_->bubble_view()->UpdateAnchor();
+ notification_bubble_->bubble_view()->UpdateBubble();
// Ensure that the notification buble is above the launcher/status area.
notification_bubble_->bubble_view()->GetWidget()->StackAtTop();
}
@@ -533,6 +533,13 @@ void SystemTray::SetShelfAlignment(ShelfAlignment alignment) {
UpdateAfterShelfAlignmentChange(alignment);
SetBorder();
tray_container_->UpdateLayout(alignment);
+ // Destroy an existing bubble so that it is rebuilt correctly.
+ bubble_.reset();
+ // Rebuild any notification bubble.
+ if (notification_bubble_.get()) {
+ notification_bubble_.reset();
+ UpdateNotificationBubble();
+ }
}
bool SystemTray::PerformAction(const views::Event& event) {
« no previous file with comments | « no previous file | ash/system/tray/tray_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698