| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 delete system_tray_; | 344 delete system_tray_; |
| 345 system_tray_ = NULL; | 345 system_tray_ = NULL; |
| 346 } | 346 } |
| 347 | 347 |
| 348 bool StatusAreaWidget::ShouldShowLauncher() const { | 348 bool StatusAreaWidget::ShouldShowLauncher() const { |
| 349 if ((system_tray_ && system_tray_->HasSystemBubble()) || | 349 if ((system_tray_ && system_tray_->HasSystemBubble()) || |
| 350 (web_notification_tray_ && | 350 (web_notification_tray_ && |
| 351 web_notification_tray_->IsMessageCenterBubbleVisible())) | 351 web_notification_tray_->IsMessageCenterBubbleVisible())) |
| 352 return true; | 352 return true; |
| 353 | 353 |
| 354 if (!Shell::GetInstance()->shelf()->IsVisible()) | 354 if (!RootWindowController::ForLauncher(GetNativeView())->shelf()->IsVisible()) |
| 355 return false; | 355 return false; |
| 356 | 356 |
| 357 // If the launcher is currently visible, don't hide the launcher if the mouse | 357 // If the launcher is currently visible, don't hide the launcher if the mouse |
| 358 // is in any of the notification bubbles. | 358 // is in any of the notification bubbles. |
| 359 return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) || | 359 return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) || |
| 360 (web_notification_tray_ && | 360 (web_notification_tray_ && |
| 361 web_notification_tray_->IsMouseInNotificationBubble()); | 361 web_notification_tray_->IsMouseInNotificationBubble()); |
| 362 } | 362 } |
| 363 | 363 |
| 364 bool StatusAreaWidget::IsMessageBubbleShown() const { | 364 bool StatusAreaWidget::IsMessageBubbleShown() const { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 return; | 422 return; |
| 423 login_status_ = login_status; | 423 login_status_ = login_status; |
| 424 if (system_tray_) | 424 if (system_tray_) |
| 425 system_tray_->UpdateAfterLoginStatusChange(login_status); | 425 system_tray_->UpdateAfterLoginStatusChange(login_status); |
| 426 if (web_notification_tray_) | 426 if (web_notification_tray_) |
| 427 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 427 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
| 428 } | 428 } |
| 429 | 429 |
| 430 } // namespace internal | 430 } // namespace internal |
| 431 } // namespace ash | 431 } // namespace ash |
| OLD | NEW |