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

Unified Diff: ash/common/shelf/shelf_widget.cc

Issue 2573703003: chromeos: Fix shelf appearing at login screen under mash (Closed)
Patch Set: rebase on session change, fix tests Created 4 years 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698