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

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

Issue 2388893002: Show tooltips in SHELF_AUTO_HIDE ShelfVisibilityState. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | ash/common/shelf/shelf_tooltip_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_tooltip_manager.cc
diff --git a/ash/common/shelf/shelf_tooltip_manager.cc b/ash/common/shelf/shelf_tooltip_manager.cc
index e84cb3a301704436645c2e409fe9a3ee9e0c3f17..e92ff5a8be3f3348501fd2032586b9847001fb4c 100644
--- a/ash/common/shelf/shelf_tooltip_manager.cc
+++ b/ash/common/shelf/shelf_tooltip_manager.cc
@@ -250,8 +250,11 @@ void ShelfTooltipManager::OnAutoHideStateChanged(ShelfAutoHideState new_state) {
}
bool ShelfTooltipManager::ShouldShowTooltipForView(views::View* view) {
- return shelf_view_ && shelf_view_->ShouldShowTooltipForView(view) &&
- shelf_view_->wm_shelf()->GetVisibilityState() == SHELF_VISIBLE;
+ WmShelf* shelf = shelf_view_ ? shelf_view_->wm_shelf() : nullptr;
+ return shelf && shelf_view_->ShouldShowTooltipForView(view) &&
+ (shelf->GetVisibilityState() == SHELF_VISIBLE ||
+ (shelf->GetVisibilityState() == SHELF_AUTO_HIDE &&
+ shelf->GetAutoHideState() == SHELF_AUTO_HIDE_SHOWN));
}
} // namespace ash
« no previous file with comments | « no previous file | ash/common/shelf/shelf_tooltip_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698