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/web_notification/web_notification_tray.h" | 5 #include "ash/system/web_notification/web_notification_tray.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/system/status_area_widget.h" | 9 #include "ash/system/status_area_widget.h" |
10 #include "ash/system/tray/tray_bubble_wrapper.h" | 10 #include "ash/system/tray/tray_bubble_wrapper.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 HidePopupBubble(); | 195 HidePopupBubble(); |
196 } else { | 196 } else { |
197 if (show_message_center_on_unlock_) | 197 if (show_message_center_on_unlock_) |
198 ShowMessageCenterBubble(); | 198 ShowMessageCenterBubble(); |
199 show_message_center_on_unlock_ = false; | 199 show_message_center_on_unlock_ = false; |
200 } | 200 } |
201 UpdateTray(); | 201 UpdateTray(); |
202 } | 202 } |
203 | 203 |
| 204 bool WebNotificationTray::ShouldBlockLauncherAutoHide() const { |
| 205 return IsMessageCenterBubbleVisible() || quiet_mode_bubble() != NULL; |
| 206 } |
| 207 |
204 bool WebNotificationTray::IsMessageCenterBubbleVisible() const { | 208 bool WebNotificationTray::IsMessageCenterBubbleVisible() const { |
205 return (message_center_bubble() && | 209 return (message_center_bubble() && |
206 message_center_bubble_->bubble()->IsVisible()); | 210 message_center_bubble_->bubble()->IsVisible()); |
207 } | 211 } |
208 | 212 |
209 bool WebNotificationTray::IsMouseInNotificationBubble() const { | 213 bool WebNotificationTray::IsMouseInNotificationBubble() const { |
210 if (!popup_bubble()) | 214 if (!popup_bubble()) |
211 return false; | 215 return false; |
212 return popup_bubble_->bubble_view()->GetBoundsInScreen().Contains( | 216 return popup_bubble_->bubble_view()->GetBoundsInScreen().Contains( |
213 Shell::GetScreen()->GetCursorScreenPoint()); | 217 Shell::GetScreen()->GetCursorScreenPoint()); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 390 |
387 message_center::MessagePopupBubble* | 391 message_center::MessagePopupBubble* |
388 WebNotificationTray::GetPopupBubbleForTest() { | 392 WebNotificationTray::GetPopupBubbleForTest() { |
389 if (!popup_bubble_.get()) | 393 if (!popup_bubble_.get()) |
390 return NULL; | 394 return NULL; |
391 return static_cast<message_center::MessagePopupBubble*>( | 395 return static_cast<message_center::MessagePopupBubble*>( |
392 popup_bubble_->bubble()); | 396 popup_bubble_->bubble()); |
393 } | 397 } |
394 | 398 |
395 } // namespace ash | 399 } // namespace ash |
OLD | NEW |