Index: ash/common/wm/overview/window_grid.h |
diff --git a/ash/common/wm/overview/window_grid.h b/ash/common/wm/overview/window_grid.h |
index cce8557c6d6c078f1beb9d27c095f5845cdd5f05..25f378847ca38e69dc94aa6b597d46339028d28d 100644 |
--- a/ash/common/wm/overview/window_grid.h |
+++ b/ash/common/wm/overview/window_grid.h |
@@ -15,6 +15,7 @@ |
#include "ash/common/wm_window_observer.h" |
#include "base/macros.h" |
#include "base/memory/scoped_vector.h" |
+#include "base/scoped_observer.h" |
namespace views { |
class Widget; |
@@ -172,8 +173,7 @@ class ASH_EXPORT WindowGrid : public WmWindowObserver { |
// Vector containing all the windows in this grid. |
ScopedVector<WindowSelectorItem> window_list_; |
- // Vector containing the observed windows. |
- std::set<WmWindow*> observed_windows_; |
+ ScopedObserver<WmWindow, WindowGrid> window_observer_; |
// Widget that darkens the screen background. |
std::unique_ptr<views::Widget> shield_widget_; |
@@ -190,6 +190,9 @@ class ASH_EXPORT WindowGrid : public WmWindowObserver { |
// Number of columns in the grid. |
size_t num_columns_; |
+ // True only after all windows have been prepared for overview. |
+ bool prepared_for_overview_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WindowGrid); |
}; |