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

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

Issue 844763006: Change overview mode to so that docked panel windows are not grouped together. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Polished after a self-review. Created 5 years, 11 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
Index: ash/wm/overview/window_selector.h
diff --git a/ash/wm/overview/window_selector.h b/ash/wm/overview/window_selector.h
index a270b489a739a3f215f9d4b9817005a4f5803031..576cbba9edf50e746c07339cdbdb4a2731926a3b 100644
--- a/ash/wm/overview/window_selector.h
+++ b/ash/wm/overview/window_selector.h
@@ -66,16 +66,29 @@ class ASH_EXPORT WindowSelector
typedef std::vector<aura::Window*> WindowList;
typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList;
- WindowSelector(const WindowList& windows,
- WindowSelectorDelegate* delegate);
+ explicit WindowSelector(WindowSelectorDelegate* delegate);
~WindowSelector() override;
+ // NOTE: The work done in Init() and Shutdown() is not done in the
+ // constructor/destructor because it may cause other, unrelated classes,
+ // (ie PanelLayoutManager) to make indirect calls to
+ // restoring_minimized_windows() on a partially constructed/destructed object.
+
+ // Initialize with the windows that can be selected.
+ void Init(const WindowList& windows);
+ // Perform cleanup that cannot be done in the destructor.
+ void Shutdown();
+
// Cancels window selection.
void CancelSelection();
// Called when the last window selector item from a grid is deleted.
void OnGridEmpty(WindowGrid* grid);
+ bool restoring_minimized_windows() const {
+ return restoring_minimized_windows_;
+ }
+
// gfx::DisplayObserver:
void OnDisplayAdded(const gfx::Display& display) override;
void OnDisplayRemoved(const gfx::Display& display) override;
@@ -169,6 +182,10 @@ class ASH_EXPORT WindowSelector
// during this overview mode session.
size_t num_times_textfield_cleared_;
+ // Tracks whether minimized windows are currently being restored for overview
+ // mode.
+ bool restoring_minimized_windows_;
+
DISALLOW_COPY_AND_ASSIGN(WindowSelector);
};

Powered by Google App Engine
This is Rietveld 408576698