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

Unified Diff: ash/wm/overview/window_selector.cc

Issue 363133002: Defer preparing for overview until all overview items are initialized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months 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/wm/overview/window_grid.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_selector.cc
diff --git a/ash/wm/overview/window_selector.cc b/ash/wm/overview/window_selector.cc
index 467aca6a8be669310006d0cafc85b779f1f87e3f..4c3930c1d767cb0062f266572d60b23886cbdd9e 100644
--- a/ash/wm/overview/window_selector.cc
+++ b/ash/wm/overview/window_selector.cc
@@ -124,6 +124,15 @@ WindowSelector::WindowSelector(const WindowList& windows,
grid_list_.push_back(grid.release());
}
+ // Do not call PrepareForOverview until all items are added to window_list_ as
+ // we don't want to cause any window updates until all windows in overview
+ // are observed. See http://crbug.com/384495.
+ for (ScopedVector<WindowGrid>::iterator iter = grid_list_.begin();
+ iter != grid_list_.end(); ++iter) {
+ (*iter)->PrepareForOverview();
+ (*iter)->PositionWindows(true);
+ }
+
DCHECK(!grid_list_.empty());
UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.Items", num_items_);
« no previous file with comments | « ash/wm/overview/window_grid.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698