OLD | NEW |
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // |animation_type|. | 154 // |animation_type|. |
155 void UpdateHeaderLayout(OverviewAnimationType animation_type); | 155 void UpdateHeaderLayout(OverviewAnimationType animation_type); |
156 | 156 |
157 // Animates opacity of the |transform_window_| and its caption to |opacity| | 157 // Animates opacity of the |transform_window_| and its caption to |opacity| |
158 // using |animation_type|. | 158 // using |animation_type|. |
159 void AnimateOpacity(float opacity, OverviewAnimationType animation_type); | 159 void AnimateOpacity(float opacity, OverviewAnimationType animation_type); |
160 | 160 |
161 // Updates the close buttons accessibility name. | 161 // Updates the close buttons accessibility name. |
162 void UpdateCloseButtonAccessibilityName(); | 162 void UpdateCloseButtonAccessibilityName(); |
163 | 163 |
| 164 // Fades out a window caption when exiting overview mode. |
| 165 void FadeOut(std::unique_ptr<views::Widget> widget); |
| 166 |
164 static bool hide_header() { return use_mask_ || use_shape_; } | 167 static bool hide_header() { return use_mask_ || use_shape_; } |
165 | 168 |
166 // True if the item is being shown in the overview, false if it's being | 169 // True if the item is being shown in the overview, false if it's being |
167 // filtered. | 170 // filtered. |
168 bool dimmed_; | 171 bool dimmed_; |
169 | 172 |
170 // The root window this item is being displayed on. | 173 // The root window this item is being displayed on. |
171 WmWindow* root_window_; | 174 WmWindow* root_window_; |
172 | 175 |
173 // The contained Window's wrapper. | 176 // The contained Window's wrapper. |
174 ScopedTransformOverviewWindow transform_window_; | 177 ScopedTransformOverviewWindow transform_window_; |
175 | 178 |
176 // The target bounds this selector item is fit within. | 179 // The target bounds this selector item is fit within. |
177 gfx::Rect target_bounds_; | 180 gfx::Rect target_bounds_; |
178 | 181 |
179 // True if running SetItemBounds. This prevents recursive calls resulting from | 182 // True if running SetItemBounds. This prevents recursive calls resulting from |
180 // the bounds update when calling ::wm::RecreateWindowLayers to copy | 183 // the bounds update when calling ::wm::RecreateWindowLayers to copy |
181 // a window layer for display on another monitor. | 184 // a window layer for display on another monitor. |
182 bool in_bounds_update_; | 185 bool in_bounds_update_; |
183 | 186 |
| 187 // True when |this| item is visually selected. Item header is made transparent |
| 188 // when the item is selected. |
| 189 bool selected_; |
| 190 |
| 191 // True initially until the UpdateHeaderLayout is invoked for the first time. |
| 192 // Provided in order to set the initial bounds for the header to animate from. |
| 193 bool first_time_; |
| 194 |
184 // Label displaying its name (active tab for tabbed windows). | 195 // Label displaying its name (active tab for tabbed windows). |
185 // With Material Design this Widget owns |caption_container_view_| and is | 196 // With Material Design this Widget owns |caption_container_view_| and is |
186 // shown above the |transform_window_|. | 197 // shown above the |transform_window_|. |
187 // Otherwise it is shown under the window. | 198 // Otherwise it is shown under the window. |
188 std::unique_ptr<views::Widget> window_label_; | 199 std::unique_ptr<views::Widget> window_label_; |
189 | 200 |
190 // Shadow around the item in overview. | 201 // Shadow around the item in overview. |
191 std::unique_ptr<::wm::Shadow> shadow_; | 202 std::unique_ptr<::wm::Shadow> shadow_; |
192 | 203 |
193 // Label background widget used to fade in opacity when moving selection. | 204 // Label background widget used to fade in opacity when moving selection. |
(...skipping 27 matching lines...) Expand all Loading... |
221 // shape. This has performance implications so it can be disabled when there | 232 // shape. This has performance implications so it can be disabled when there |
222 // are many windows. | 233 // are many windows. |
223 static bool use_shape_; | 234 static bool use_shape_; |
224 | 235 |
225 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); | 236 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); |
226 }; | 237 }; |
227 | 238 |
228 } // namespace ash | 239 } // namespace ash |
229 | 240 |
230 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ | 241 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ |
OLD | NEW |