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

Unified Diff: ash/common/wm/overview/window_grid.h

Issue 2470343003: Use mirror layer for minimized windows in overview mode (Closed)
Patch Set: Created 4 years, 1 month 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/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 a85b982078b51459ad88f2449938b6e43bb6ddc4..28812005850cf6d27062b2ef42adfc5b938bf3c6 100644
--- a/ash/common/wm/overview/window_grid.h
+++ b/ash/common/wm/overview/window_grid.h
@@ -12,6 +12,7 @@
#include <vector>
#include "ash/common/wm/overview/window_selector.h"
+#include "ash/common/wm/window_state_observer.h"
#include "ash/common/wm_window_observer.h"
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
@@ -49,7 +50,8 @@ class WindowSelectorItem;
// 0, 3, 6, 1, 4, 2, 5
varkha 2016/11/08 00:02:56 Can you also please delete the 2 lines above this
oshima 2016/11/10 23:58:47 Done.
// The selector is switched to the next window grid (if available) or wrapped if
// it reaches the end of its movement sequence.
-class ASH_EXPORT WindowGrid : public WmWindowObserver {
+class ASH_EXPORT WindowGrid : public WmWindowObserver,
+ public wm::WindowStateObserver {
public:
WindowGrid(WmWindow* root_window,
const std::vector<WmWindow*>& window_list,
@@ -123,6 +125,10 @@ class ASH_EXPORT WindowGrid : public WmWindowObserver {
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override;
+ // wm::WindowStateObserver:
+ void OnPostWindowStateTypeChange(wm::WindowState* window_state,
+ wm::WindowStateType old_type) override;
+
private:
friend class WindowSelectorTest;
@@ -167,6 +173,7 @@ class ASH_EXPORT WindowGrid : public WmWindowObserver {
ScopedVector<WindowSelectorItem> window_list_;
ScopedObserver<WmWindow, WindowGrid> window_observer_;
+ ScopedObserver<wm::WindowState, WindowGrid> window_state_observer_;
// Widget that darkens the screen background.
std::unique_ptr<views::Widget> shield_widget_;

Powered by Google App Engine
This is Rietveld 408576698