Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Unified Diff: ash/system/status_area_widget.cc

Issue 1659283002: ash: Explicitly teach various components about ShelfLayoutManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ozone-ui-event-platform-event
Patch Set: fix-test Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/status_area_widget.h ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/status_area_widget.cc
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index 92aa950e109f5c00f3495f14ca907f474ade8542..09bb1519ad3797421f30ee0c67c44b79afaa5c6a 100644
--- a/ash/system/status_area_widget.cc
+++ b/ash/system/status_area_widget.cc
@@ -30,7 +30,8 @@ namespace ash {
const char StatusAreaWidget::kNativeViewName[] = "StatusAreaWidget";
-StatusAreaWidget::StatusAreaWidget(aura::Window* status_container)
+StatusAreaWidget::StatusAreaWidget(aura::Window* status_container,
+ ShelfWidget* shelf_widget)
: status_area_widget_delegate_(new StatusAreaWidgetDelegate),
overview_button_tray_(NULL),
system_tray_(NULL),
@@ -39,7 +40,8 @@ StatusAreaWidget::StatusAreaWidget(aura::Window* status_container)
logout_button_tray_(NULL),
virtual_keyboard_tray_(NULL),
#endif
- login_status_(user::LOGGED_IN_NONE) {
+ login_status_(user::LOGGED_IN_NONE),
+ shelf_widget_(shelf_widget) {
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
params.delegate = status_area_widget_delegate_;
@@ -101,7 +103,7 @@ bool StatusAreaWidget::ShouldShowShelf() const {
web_notification_tray_->ShouldBlockShelfAutoHide()))
return true;
- if (!RootWindowController::ForShelf(GetNativeView())->shelf()->IsVisible())
+ if (!shelf_widget_->shelf()->IsVisible())
return false;
// If the shelf is currently visible, don't hide the shelf if the mouse
« no previous file with comments | « ash/system/status_area_widget.h ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698