Index: ash/common/shelf/shelf_window_watcher.h |
diff --git a/ash/common/shelf/shelf_window_watcher.h b/ash/common/shelf/shelf_window_watcher.h |
index 45565e8f4b67f375d0109445f62bf5a321277683..9eb3cd2aed1d61bbcd389da46ddc128d6f3571b1 100644 |
--- a/ash/common/shelf/shelf_window_watcher.h |
+++ b/ash/common/shelf/shelf_window_watcher.h |
@@ -5,6 +5,8 @@ |
#ifndef ASH_COMMON_SHELF_SHELF_WINDOW_WATCHER_H_ |
#define ASH_COMMON_SHELF_SHELF_WINDOW_WATCHER_H_ |
+#include <set> |
+ |
#include "ash/common/wm_activation_observer.h" |
#include "ash/common/wm_window_observer.h" |
#include "base/macros.h" |
@@ -17,10 +19,11 @@ class ShelfModel; |
class WmWindow; |
// ShelfWindowWatcher creates and handles a ShelfItem for windows in the default |
-// container that have a valid ShelfItemType property (e.g. the task manager |
-// dialog or the OS settings window). It adds the ShelfItem when the window is |
-// added to the default container and maintains it until the window is closed, |
-// even if the window is transiently reparented (e.g. during a drag). |
+// container and panels in the panel container that have a valid ShelfItemType |
+// property (e.g. the task manager dialog or the OS settings window). It adds |
+// the ShelfItem when the window is added to the default container and maintains |
+// it until the window is closed, even if the window is transiently reparented |
+// (e.g. during a drag). |
class ShelfWindowWatcher : public WmActivationObserver, |
public display::DisplayObserver { |
public: |
@@ -69,10 +72,7 @@ class ShelfWindowWatcher : public WmActivationObserver, |
// Removes a ShelfItem for |window|. |
void RemoveShelfItem(WmWindow* window); |
- // Updates the status of ShelfItem for |window|. |
- void UpdateShelfItemStatus(WmWindow* window, bool is_active); |
- |
- // Returns the index of ShelfItem associated with |window|. |
+ // Returns the index of ShelfItem associated with |window|, or -1 if none. |
int GetShelfItemIndexForWindow(WmWindow* window) const; |
// Cleans up observers on |container|. |
@@ -106,6 +106,9 @@ class ShelfWindowWatcher : public WmActivationObserver, |
ScopedObserver<WmWindow, ContainerWindowObserver> observed_container_windows_; |
ScopedObserver<WmWindow, UserWindowObserver> observed_user_windows_; |
+ // The set of windows with shelf items managed by this ShelfWindowWatcher. |
+ std::set<WmWindow*> user_windows_with_items_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ShelfWindowWatcher); |
}; |