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

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

Issue 2558963002: Move shelf item tooltip flag from delegate to item. (Closed)
Patch Set: Cleanup 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_window_watcher.cc
diff --git a/ash/common/shelf/shelf_window_watcher.cc b/ash/common/shelf/shelf_window_watcher.cc
index 648a8060b2086a5c6f2fa454a28b307d9a249fa7..2b7ee83ed3ef85df0aea6147d76a1c56c1cbe9f3 100644
--- a/ash/common/shelf/shelf_window_watcher.cc
+++ b/ash/common/shelf/shelf_window_watcher.cc
@@ -38,6 +38,11 @@ void UpdateShelfItemForWindow(ShelfItem* item, WmWindow* window) {
item->image = window->GetAppIcon();
if (item->image.isNull())
item->image = window->GetWindowIcon();
+
+ // Do not show tooltips for visible attached app panel windows.
+ item->shows_tooltip =
+ item->type != TYPE_APP_PANEL || !window->IsVisible() ||
sky 2016/12/08 00:38:54 Do we always end up back in this function when the
msw 2016/12/08 20:31:36 This was just working by chance, because minimizin
+ !window->GetBoolProperty(WmWindowProperty::PANEL_ATTACHED);
}
} // namespace
@@ -80,6 +85,7 @@ void ShelfWindowWatcher::UserWindowObserver::OnWindowPropertyChanged(
if (property == WmWindowProperty::APP_ICON ||
property == WmWindowProperty::APP_ID ||
property == WmWindowProperty::DRAW_ATTENTION ||
+ property == WmWindowProperty::PANEL_ATTACHED ||
property == WmWindowProperty::SHELF_ITEM_TYPE ||
property == WmWindowProperty::WINDOW_ICON) {
window_watcher_->OnUserWindowPropertyChanged(window);

Powered by Google App Engine
This is Rietveld 408576698