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/common/system/status_area_widget.h" | 5 #include "ash/common/system/status_area_widget.h" |
6 | 6 |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/shelf/wm_shelf.h" | 8 #include "ash/common/shelf/wm_shelf.h" |
9 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" | 9 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" |
10 #include "ash/common/system/chromeos/palette/palette_tray.h" | 10 #include "ash/common/system/chromeos/palette/palette_tray.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 (web_notification_tray_ && | 136 (web_notification_tray_ && |
137 web_notification_tray_->ShouldBlockShelfAutoHide())) | 137 web_notification_tray_->ShouldBlockShelfAutoHide())) |
138 return true; | 138 return true; |
139 | 139 |
140 if (palette_tray_ && palette_tray_->ShouldBlockShelfAutoHide()) | 140 if (palette_tray_ && palette_tray_->ShouldBlockShelfAutoHide()) |
141 return true; | 141 return true; |
142 | 142 |
143 if (ime_menu_tray_ && ime_menu_tray_->ShouldBlockShelfAutoHide()) | 143 if (ime_menu_tray_ && ime_menu_tray_->ShouldBlockShelfAutoHide()) |
144 return true; | 144 return true; |
145 | 145 |
146 if (!wm_shelf_->IsVisible()) | 146 return false; |
147 return false; | |
148 | |
149 // If the shelf is currently visible, don't hide the shelf if the mouse | |
150 // is in any of the notification bubbles. | |
151 return system_tray_ && system_tray_->IsMouseInNotificationBubble(); | |
152 } | 147 } |
153 | 148 |
154 bool StatusAreaWidget::IsMessageBubbleShown() const { | 149 bool StatusAreaWidget::IsMessageBubbleShown() const { |
155 return ((system_tray_ && system_tray_->IsAnyBubbleVisible()) || | 150 return ((system_tray_ && system_tray_->IsSystemBubbleVisible()) || |
156 (web_notification_tray_ && | 151 (web_notification_tray_ && |
157 web_notification_tray_->IsMessageCenterBubbleVisible())); | 152 web_notification_tray_->IsMessageCenterBubbleVisible())); |
158 } | 153 } |
159 | 154 |
160 void StatusAreaWidget::SchedulePaint() { | 155 void StatusAreaWidget::SchedulePaint() { |
161 status_area_widget_delegate_->SchedulePaint(); | 156 status_area_widget_delegate_->SchedulePaint(); |
162 web_notification_tray_->SchedulePaint(); | 157 web_notification_tray_->SchedulePaint(); |
163 system_tray_->SchedulePaint(); | 158 system_tray_->SchedulePaint(); |
164 virtual_keyboard_tray_->SchedulePaint(); | 159 virtual_keyboard_tray_->SchedulePaint(); |
165 logout_button_tray_->SchedulePaint(); | 160 logout_button_tray_->SchedulePaint(); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); | 229 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); |
235 status_area_widget_delegate_->AddTray(ime_menu_tray_); | 230 status_area_widget_delegate_->AddTray(ime_menu_tray_); |
236 } | 231 } |
237 | 232 |
238 void StatusAreaWidget::AddOverviewButtonTray() { | 233 void StatusAreaWidget::AddOverviewButtonTray() { |
239 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); | 234 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); |
240 status_area_widget_delegate_->AddTray(overview_button_tray_); | 235 status_area_widget_delegate_->AddTray(overview_button_tray_); |
241 } | 236 } |
242 | 237 |
243 } // namespace ash | 238 } // namespace ash |
OLD | NEW |