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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 if (!wm_shelf_->IsVisible()) |
147 return false; | 147 return false; |
sadrul
2017/02/07 05:42:20
You can remove this too.
yiyix
2017/02/07 22:03:22
true, I don't need a separate case for this to ret
| |
148 | 148 |
149 // If the shelf is currently visible, don't hide the shelf if the mouse | 149 return false; |
150 // is in any of the notification bubbles. | |
151 return system_tray_ && system_tray_->IsMouseInNotificationBubble(); | |
152 } | 150 } |
153 | 151 |
154 bool StatusAreaWidget::IsMessageBubbleShown() const { | 152 bool StatusAreaWidget::IsMessageBubbleShown() const { |
155 return ((system_tray_ && system_tray_->IsAnyBubbleVisible()) || | 153 return ((system_tray_ && system_tray_->IsSystemBubbleVisible()) || |
156 (web_notification_tray_ && | 154 (web_notification_tray_ && |
157 web_notification_tray_->IsMessageCenterBubbleVisible())); | 155 web_notification_tray_->IsMessageCenterBubbleVisible())); |
158 } | 156 } |
159 | 157 |
160 void StatusAreaWidget::SchedulePaint() { | 158 void StatusAreaWidget::SchedulePaint() { |
161 status_area_widget_delegate_->SchedulePaint(); | 159 status_area_widget_delegate_->SchedulePaint(); |
162 web_notification_tray_->SchedulePaint(); | 160 web_notification_tray_->SchedulePaint(); |
163 system_tray_->SchedulePaint(); | 161 system_tray_->SchedulePaint(); |
164 virtual_keyboard_tray_->SchedulePaint(); | 162 virtual_keyboard_tray_->SchedulePaint(); |
165 logout_button_tray_->SchedulePaint(); | 163 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_); | 232 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); |
235 status_area_widget_delegate_->AddTray(ime_menu_tray_); | 233 status_area_widget_delegate_->AddTray(ime_menu_tray_); |
236 } | 234 } |
237 | 235 |
238 void StatusAreaWidget::AddOverviewButtonTray() { | 236 void StatusAreaWidget::AddOverviewButtonTray() { |
239 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); | 237 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); |
240 status_area_widget_delegate_->AddTray(overview_button_tray_); | 238 status_area_widget_delegate_->AddTray(overview_button_tray_); |
241 } | 239 } |
242 | 240 |
243 } // namespace ash | 241 } // namespace ash |
OLD | NEW |