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

Unified Diff: ash/common/shelf/shelf_window_watcher_item_delegate.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_window_watcher_item_delegate.h ('k') | ash/common/test/test_shelf_item_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_window_watcher_item_delegate.cc
diff --git a/ash/common/shelf/shelf_window_watcher_item_delegate.cc b/ash/common/shelf/shelf_window_watcher_item_delegate.cc
index e1dc5ce981de3c3e9c73dd2cfb52166d0bb460d0..d0679cc6a3979dfbc6d235794530418caa0422e5 100644
--- a/ash/common/shelf/shelf_window_watcher_item_delegate.cc
+++ b/ash/common/shelf/shelf_window_watcher_item_delegate.cc
@@ -9,6 +9,7 @@
#include "ash/common/wm/window_state.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
+#include "ash/common/wm_window_property.h"
#include "ui/events/event.h"
namespace ash {
@@ -36,7 +37,7 @@ ShelfItemDelegate::PerformedAction ShelfWindowWatcherItemDelegate::ItemSelected(
const ui::Event& event) {
// Move panels attached on another display to the current display.
if (GetShelfItemType(id_) == TYPE_APP_PANEL &&
- window_->GetWindowState()->panel_attached() &&
+ window_->GetBoolProperty(WmWindowProperty::PANEL_ATTACHED) &&
window_->MoveToEventRoot(event)) {
window_->Activate();
return kExistingWindowActivated;
@@ -71,12 +72,6 @@ bool ShelfWindowWatcherItemDelegate::CanPin() const {
return GetShelfItemType(id_) != TYPE_APP_PANEL;
}
-bool ShelfWindowWatcherItemDelegate::ShouldShowTooltip() {
- // Do not show tooltips for visible attached app panel windows.
- return GetShelfItemType(id_) != TYPE_APP_PANEL || !window_->IsVisible() ||
- !window_->GetWindowState()->panel_attached();
-}
-
void ShelfWindowWatcherItemDelegate::Close() {
window_->CloseWidget();
}
« no previous file with comments | « ash/common/shelf/shelf_window_watcher_item_delegate.h ('k') | ash/common/test/test_shelf_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698