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/status_area_widget.h" | 5 #include "ash/system/status_area_widget.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) { | 110 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) { |
111 status_area_widget_delegate_->set_alignment(alignment); | 111 status_area_widget_delegate_->set_alignment(alignment); |
112 if (system_tray_) | 112 if (system_tray_) |
113 system_tray_->SetShelfAlignment(alignment); | 113 system_tray_->SetShelfAlignment(alignment); |
114 if (web_notification_tray_) | 114 if (web_notification_tray_) |
115 web_notification_tray_->SetShelfAlignment(alignment); | 115 web_notification_tray_->SetShelfAlignment(alignment); |
116 status_area_widget_delegate_->UpdateLayout(); | 116 status_area_widget_delegate_->UpdateLayout(); |
117 } | 117 } |
118 | 118 |
119 void StatusAreaWidget::SetHideWebNotifications(bool hide) { | |
120 if (web_notification_tray_) | |
121 web_notification_tray_->SetHidePopupBubble(hide); | |
122 } | |
123 | |
124 void StatusAreaWidget::SetHideSystemNotifications(bool hide) { | 119 void StatusAreaWidget::SetHideSystemNotifications(bool hide) { |
125 if (system_tray_) | 120 if (system_tray_) |
126 system_tray_->SetHideNotifications(hide); | 121 system_tray_->SetHideNotifications(hide); |
127 } | 122 } |
128 | 123 |
129 bool StatusAreaWidget::ShouldShowWebNotifications() { | 124 bool StatusAreaWidget::ShouldShowWebNotifications() { |
130 return !(system_tray_ && system_tray_->IsAnyBubbleVisible()); | 125 return !(system_tray_ && system_tray_->IsAnyBubbleVisible()); |
131 } | 126 } |
132 | 127 |
133 void StatusAreaWidget::UpdateAfterLoginStatusChange( | 128 void StatusAreaWidget::UpdateAfterLoginStatusChange( |
134 user::LoginStatus login_status) { | 129 user::LoginStatus login_status) { |
135 if (login_status_ == login_status) | 130 if (login_status_ == login_status) |
136 return; | 131 return; |
137 login_status_ = login_status; | 132 login_status_ = login_status; |
138 if (system_tray_) | 133 if (system_tray_) |
139 system_tray_->UpdateAfterLoginStatusChange(login_status); | 134 system_tray_->UpdateAfterLoginStatusChange(login_status); |
140 if (web_notification_tray_) | 135 if (web_notification_tray_) |
141 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 136 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
142 } | 137 } |
143 | 138 |
144 } // namespace internal | 139 } // namespace internal |
145 } // namespace ash | 140 } // namespace ash |
OLD | NEW |