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/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // in the destructor if Shutdown() is not called (e.g. in tests). | 63 // in the destructor if Shutdown() is not called (e.g. in tests). |
64 delete web_notification_tray_; | 64 delete web_notification_tray_; |
65 web_notification_tray_ = NULL; | 65 web_notification_tray_ = NULL; |
66 delete system_tray_; | 66 delete system_tray_; |
67 system_tray_ = NULL; | 67 system_tray_ = NULL; |
68 } | 68 } |
69 | 69 |
70 bool StatusAreaWidget::ShouldShowLauncher() const { | 70 bool StatusAreaWidget::ShouldShowLauncher() const { |
71 if ((system_tray_ && system_tray_->ShouldShowLauncher()) || | 71 if ((system_tray_ && system_tray_->ShouldShowLauncher()) || |
72 (web_notification_tray_ && | 72 (web_notification_tray_ && |
73 web_notification_tray_->IsMessageCenterBubbleVisible())) | 73 web_notification_tray_->ShouldBlockLauncherAutoHide())) |
74 return true; | 74 return true; |
75 | 75 |
76 if (!RootWindowController::ForLauncher(GetNativeView())->shelf()->IsVisible()) | 76 if (!RootWindowController::ForLauncher(GetNativeView())->shelf()->IsVisible()) |
77 return false; | 77 return false; |
78 | 78 |
79 // If the launcher is currently visible, don't hide the launcher if the mouse | 79 // If the launcher is currently visible, don't hide the launcher if the mouse |
80 // is in any of the notification bubbles. | 80 // is in any of the notification bubbles. |
81 return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) || | 81 return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) || |
82 (web_notification_tray_ && | 82 (web_notification_tray_ && |
83 web_notification_tray_->IsMouseInNotificationBubble()); | 83 web_notification_tray_->IsMouseInNotificationBubble()); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 return; | 137 return; |
138 login_status_ = login_status; | 138 login_status_ = login_status; |
139 if (system_tray_) | 139 if (system_tray_) |
140 system_tray_->UpdateAfterLoginStatusChange(login_status); | 140 system_tray_->UpdateAfterLoginStatusChange(login_status); |
141 if (web_notification_tray_) | 141 if (web_notification_tray_) |
142 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 142 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
143 } | 143 } |
144 | 144 |
145 } // namespace internal | 145 } // namespace internal |
146 } // namespace ash | 146 } // namespace ash |
OLD | NEW |