Index: ash/common/shelf/shelf_widget.cc |
diff --git a/ash/common/shelf/shelf_widget.cc b/ash/common/shelf/shelf_widget.cc |
index 4ebc52eec6e2f401e9dc2457ebc6ad257f9642a1..a288b47823353e9ace2796dfac83f61ddae36e74 100644 |
--- a/ash/common/shelf/shelf_widget.cc |
+++ b/ash/common/shelf/shelf_widget.cc |
@@ -331,6 +331,10 @@ void ShelfWidget::PostCreateShelf() { |
// Ensure the newly created |shelf_| gets current values. |
background_animator_.Initialize(this); |
+ // TODO(jamescook): The IsActiveUserSessionStarted() check may not be needed |
+ // because the shelf is only created after the first user session is active. |
+ // If the shelf view is always visible after creation then some of the shelf |
+ // visibility code could be simplified. http://crbug.com/674773 |
msw
2016/12/16 16:26:20
What happens for the lock screen? Isn't the shelf
James Cook
2016/12/20 04:02:42
Updated comment.
The shelf is hidden at the lock
|
shelf_view_->SetVisible( |
WmShell::Get()->GetSessionStateDelegate()->IsActiveUserSessionStarted()); |
shelf_layout_manager_->LayoutShelf(); |
@@ -342,11 +346,6 @@ bool ShelfWidget::IsShelfVisible() const { |
return shelf_view_ && shelf_view_->visible(); |
} |
-void ShelfWidget::SetShelfVisibility(bool visible) { |
- if (shelf_view_) |
- shelf_view_->SetVisible(visible); |
-} |
- |
bool ShelfWidget::IsShowingAppList() const { |
return GetAppListButton() && GetAppListButton()->is_showing_app_list(); |
} |