Index: ash/common/shelf/shelf_view.cc |
diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc |
index 74cc4bc1d4becf8fbfdfc9ca51045e65afdcc672..24f9b1d90c7c66da4a747faad31a9541fd1bfbd3 100644 |
--- a/ash/common/shelf/shelf_view.cc |
+++ b/ash/common/shelf/shelf_view.cc |
@@ -527,14 +527,11 @@ bool ShelfView::ShouldHideTooltip(const gfx::Point& cursor_location) const { |
} |
bool ShelfView::ShouldShowTooltipForView(const views::View* view) const { |
- if (view == GetAppListButton() && |
- WmShell::Get()->GetAppListTargetVisibility()) { |
+ // TODO(msw): Push this app list state into ShelfItem::shows_tooltip. |
+ if (view == GetAppListButton() && GetAppListButton()->is_showing_app_list()) |
return false; |
- } |
const ShelfItem* item = ShelfItemForView(view); |
- if (!item) |
- return false; |
- return model_->GetShelfItemDelegate(item->id)->ShouldShowTooltip(); |
+ return item && item->shows_tooltip; |
} |
base::string16 ShelfView::GetTitleForView(const views::View* view) const { |