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

Unified Diff: ash/system/web_notification/web_notification_tray.cc

Issue 10834338: Move non SystemTray specific code to TrayBackgroundView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 8 years, 4 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 | « ash/system/web_notification/web_notification_tray.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/web_notification_tray.cc
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc
index 44e1999ba5d58affb694c87b37cbf8c3c4786b8b..6c1043c49ddb85a969b4d8ecf4adefa02cb542db 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -762,6 +762,7 @@ class WebNotificationTray::Bubble : public TrayBubbleView::Host,
}
views::Widget* bubble_widget() const { return bubble_widget_; }
+ TrayBubbleView* bubble_view() const { return bubble_view_; }
// Overridden from TrayBubbleView::Host.
virtual void BubbleViewDestroyed() OVERRIDE {
@@ -966,6 +967,16 @@ void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) {
HideNotificationBubble();
}
+void WebNotificationTray::AnchorUpdated() {
+ if (notification_bubble_.get()) {
+ notification_bubble_->bubble_view()->UpdateBubble();
+ // Ensure that the notification buble is above the launcher/status area.
+ notification_bubble_->bubble_view()->GetWidget()->StackAtTop();
+ }
+ if (message_center_bubble_.get())
+ message_center_bubble_->bubble_view()->UpdateBubble();
+}
+
// Protected methods (invoked only from Bubble and its child classes)
void WebNotificationTray::SendRemoveNotification(const std::string& id) {
@@ -1041,7 +1052,10 @@ void WebNotificationTray::UpdateTray() {
count_label_->SetEnabledColor(
(notification_list()->notifications().size() == 0) ?
kMessageCountDimmedColor : kMessageCountColor);
- SetVisible((status_area_widget()->login_status() != user::LOGGED_IN_NONE));
+ bool is_visible =
+ (status_area_widget()->login_status() != user::LOGGED_IN_NONE) &&
+ (status_area_widget()->login_status() != user::LOGGED_IN_LOCKED);
+ SetVisible(is_visible);
Layout();
SchedulePaint();
}
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698