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

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

Issue 2558963002: Move shelf item tooltip flag from delegate to item. (Closed)
Patch Set: Remove WmWindowMus::SetBoolProperty override. 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
« no previous file with comments | « ash/common/shelf/shelf_item_types.cc ('k') | ash/common/shelf/shelf_window_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « ash/common/shelf/shelf_item_types.cc ('k') | ash/common/shelf/shelf_window_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698