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

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

Issue 2000303003: Update cached height for popup notifications after shelf alignment changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 if (alignment == shelf_alignment()) 617 if (alignment == shelf_alignment())
618 return; 618 return;
619 TrayBackgroundView::SetShelfAlignment(alignment); 619 TrayBackgroundView::SetShelfAlignment(alignment);
620 UpdateAfterShelfAlignmentChange(alignment); 620 UpdateAfterShelfAlignmentChange(alignment);
621 // Destroy any existing bubble so that it is rebuilt correctly. 621 // Destroy any existing bubble so that it is rebuilt correctly.
622 CloseSystemBubbleAndDeactivateSystemTray(); 622 CloseSystemBubbleAndDeactivateSystemTray();
623 // Rebuild any notification bubble. 623 // Rebuild any notification bubble.
624 if (notification_bubble_) { 624 if (notification_bubble_) {
625 notification_bubble_.reset(); 625 notification_bubble_.reset();
626 UpdateNotificationBubble(); 626 UpdateNotificationBubble();
627 // UpdateWebNotifications() should be called in UpdateNotificationBubble().
628 } else if (!hide_notifications_) {
629 UpdateWebNotifications();
627 } 630 }
628 } 631 }
629 632
630 void SystemTray::AnchorUpdated() { 633 void SystemTray::AnchorUpdated() {
631 if (notification_bubble_) { 634 if (notification_bubble_) {
632 notification_bubble_->bubble_view()->UpdateBubble(); 635 notification_bubble_->bubble_view()->UpdateBubble();
633 // Ensure that the notification buble is above the shelf/status area. 636 // Ensure that the notification buble is above the shelf/status area.
634 notification_bubble_->bubble_view()->GetWidget()->StackAtTop(); 637 notification_bubble_->bubble_view()->GetWidget()->StackAtTop();
635 UpdateBubbleViewArrow(notification_bubble_->bubble_view()); 638 UpdateBubbleViewArrow(notification_bubble_->bubble_view());
636 } 639 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 .work_area() 756 .work_area()
754 .height(); 757 .height();
755 if (work_area_height > 0) { 758 if (work_area_height > 0) {
756 UMA_HISTOGRAM_CUSTOM_COUNTS( 759 UMA_HISTOGRAM_CUSTOM_COUNTS(
757 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", 760 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu",
758 100 * bubble_view->height() / work_area_height, 1, 300, 100); 761 100 * bubble_view->height() / work_area_height, 1, 300, 100);
759 } 762 }
760 } 763 }
761 764
762 } // namespace ash 765 } // 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