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

Side by Side Diff: ash/common/wm/overview/window_selector_item.h

Issue 2470343003: Use mirror layer for minimized windows in overview mode (Closed)
Patch Set: Use mirror layer for minimized windows in overview mode 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 5 #ifndef ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Returns true if |target| is contained in this WindowSelectorItem. 91 // Returns true if |target| is contained in this WindowSelectorItem.
92 bool Contains(const WmWindow* target) const; 92 bool Contains(const WmWindow* target) const;
93 93
94 // Restores and animates the managed window to its non overview mode state. 94 // Restores and animates the managed window to its non overview mode state.
95 void RestoreWindow(); 95 void RestoreWindow();
96 96
97 // Restores stacking of window captions above the windows, then fades out. 97 // Restores stacking of window captions above the windows, then fades out.
98 void Shutdown(); 98 void Shutdown();
99 99
100 // Forces the managed window to be shown (ie not hidden or minimized) when
101 // calling RestoreWindow().
102 void ShowWindowOnExit();
103
104 // Dispatched before beginning window overview. This will do any necessary 100 // Dispatched before beginning window overview. This will do any necessary
105 // one time actions such as restoring minimized windows. 101 // one time actions such as restoring minimized windows.
106 void PrepareForOverview(); 102 void PrepareForOverview();
107 103
108 // Calculates and returns an optimal scale ratio. With MD this is only 104 // Calculates and returns an optimal scale ratio. With MD this is only
109 // taking into account |size.height()| as the width can vary. Without MD this 105 // taking into account |size.height()| as the width can vary. Without MD this
110 // returns the scale that allows the item to fully fit within |size|. 106 // returns the scale that allows the item to fully fit within |size|.
111 float GetItemScale(const gfx::Size& size); 107 float GetItemScale(const gfx::Size& size);
112 108
113 // Returns the union of the original target bounds of all transformed windows 109 // Returns the union of the original target bounds of all transformed windows
(...skipping 17 matching lines...) Expand all
131 // so that it's highlighted and announced if accessibility features are 127 // so that it's highlighted and announced if accessibility features are
132 // enabled. 128 // enabled.
133 void SendAccessibleSelectionEvent(); 129 void SendAccessibleSelectionEvent();
134 130
135 // Closes |transform_window_|. 131 // Closes |transform_window_|.
136 void CloseWindow(); 132 void CloseWindow();
137 133
138 // Hides the original window header. 134 // Hides the original window header.
139 void HideHeader(); 135 void HideHeader();
140 136
137 // Called when the window is minimized or unminimized.
138 void OnMinimizedStateChanged();
139
141 // Sets if the item is dimmed in the overview. Changing the value will also 140 // Sets if the item is dimmed in the overview. Changing the value will also
142 // change the visibility of the transform windows. 141 // change the visibility of the transform windows.
143 void SetDimmed(bool dimmed); 142 void SetDimmed(bool dimmed);
144 bool dimmed() const { return dimmed_; } 143 bool dimmed() const { return dimmed_; }
145 144
146 const gfx::Rect& target_bounds() const { return target_bounds_; } 145 const gfx::Rect& target_bounds() const { return target_bounds_; }
147 146
148 // views::ButtonListener: 147 // views::ButtonListener:
149 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 148 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
150 149
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 192
194 // Updates the close buttons accessibility name. 193 // Updates the close buttons accessibility name.
195 void UpdateCloseButtonAccessibilityName(); 194 void UpdateCloseButtonAccessibilityName();
196 195
197 // Fades out a window caption when exiting overview mode. 196 // Fades out a window caption when exiting overview mode.
198 void FadeOut(std::unique_ptr<views::Widget> widget); 197 void FadeOut(std::unique_ptr<views::Widget> widget);
199 198
200 // Allows a test to directly set animation state. 199 // Allows a test to directly set animation state.
201 gfx::SlideAnimation* GetBackgroundViewAnimation(); 200 gfx::SlideAnimation* GetBackgroundViewAnimation();
202 201
202 WmWindow* GetOverviewWindowForMinimizedStateForTest();
203
203 // True if the item is being shown in the overview, false if it's being 204 // True if the item is being shown in the overview, false if it's being
204 // filtered. 205 // filtered.
205 bool dimmed_; 206 bool dimmed_;
206 207
207 // The root window this item is being displayed on. 208 // The root window this item is being displayed on.
208 WmWindow* root_window_; 209 WmWindow* root_window_;
209 210
210 // The contained Window's wrapper. 211 // The contained Window's wrapper.
211 ScopedTransformOverviewWindow transform_window_; 212 ScopedTransformOverviewWindow transform_window_;
212 213
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Pointer to a view that covers the original header and has rounded top 251 // Pointer to a view that covers the original header and has rounded top
251 // corners. This view can have its color and opacity animated. 252 // corners. This view can have its color and opacity animated.
252 RoundedContainerView* background_view_; 253 RoundedContainerView* background_view_;
253 254
254 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); 255 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
255 }; 256 };
256 257
257 } // namespace ash 258 } // namespace ash
258 259
259 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 260 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_selector.cc ('k') | ash/common/wm/overview/window_selector_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698