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

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

Issue 2383833003: Show tooltips in SHELF_AUTO_HIDE ShelfVisibilityState. (Closed)
Patch Set: Fix auto-hide shown and hidden behavior; fix tests. Created 4 years, 3 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 b655cb7bac8557c98917429daea1028c9cdf3548..5e2c5a6dbc390fbcb848ba5ef3f94d3a0f7b104b 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