| 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/public/cpp/shell_window_ids.h" | 7 #include "ash/public/cpp/shell_window_ids.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shelf/wm_shelf.h" | 9 #include "ash/shelf/wm_shelf.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 system_tray_->UpdateAfterLoginStatusChange(login_status); | 129 system_tray_->UpdateAfterLoginStatusChange(login_status); |
| 130 if (web_notification_tray_) | 130 if (web_notification_tray_) |
| 131 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 131 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
| 132 if (logout_button_tray_) | 132 if (logout_button_tray_) |
| 133 logout_button_tray_->UpdateAfterLoginStatusChange(); | 133 logout_button_tray_->UpdateAfterLoginStatusChange(); |
| 134 if (overview_button_tray_) | 134 if (overview_button_tray_) |
| 135 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); | 135 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 136 } | 136 } |
| 137 | 137 |
| 138 bool StatusAreaWidget::ShouldShowShelf() const { | 138 bool StatusAreaWidget::ShouldShowShelf() const { |
| 139 if ((system_tray_ && system_tray_->ShouldShowShelf()) || | 139 return (system_tray_ && system_tray_->ShouldShowShelf()) || |
| 140 (web_notification_tray_ && | 140 views::TrayBubbleView::IsATrayBubbleOpen(); |
| 141 web_notification_tray_->ShouldBlockShelfAutoHide())) | |
| 142 return true; | |
| 143 | |
| 144 if (palette_tray_ && palette_tray_->ShouldBlockShelfAutoHide()) | |
| 145 return true; | |
| 146 | |
| 147 if (ime_menu_tray_ && ime_menu_tray_->ShouldBlockShelfAutoHide()) | |
| 148 return true; | |
| 149 | |
| 150 return false; | |
| 151 } | 141 } |
| 152 | 142 |
| 153 bool StatusAreaWidget::IsMessageBubbleShown() const { | 143 bool StatusAreaWidget::IsMessageBubbleShown() const { |
| 154 return ((system_tray_ && system_tray_->IsSystemBubbleVisible()) || | 144 return ((system_tray_ && system_tray_->IsSystemBubbleVisible()) || |
| 155 (web_notification_tray_ && | 145 (web_notification_tray_ && |
| 156 web_notification_tray_->IsMessageCenterBubbleVisible())); | 146 web_notification_tray_->IsMessageCenterBubbleVisible())); |
| 157 } | 147 } |
| 158 | 148 |
| 159 void StatusAreaWidget::SchedulePaint() { | 149 void StatusAreaWidget::SchedulePaint() { |
| 160 status_area_widget_delegate_->SchedulePaint(); | 150 status_area_widget_delegate_->SchedulePaint(); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); | 217 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); |
| 228 status_area_widget_delegate_->AddTray(ime_menu_tray_); | 218 status_area_widget_delegate_->AddTray(ime_menu_tray_); |
| 229 } | 219 } |
| 230 | 220 |
| 231 void StatusAreaWidget::AddOverviewButtonTray() { | 221 void StatusAreaWidget::AddOverviewButtonTray() { |
| 232 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); | 222 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); |
| 233 status_area_widget_delegate_->AddTray(overview_button_tray_); | 223 status_area_widget_delegate_->AddTray(overview_button_tray_); |
| 234 } | 224 } |
| 235 | 225 |
| 236 } // namespace ash | 226 } // namespace ash |
| OLD | NEW |