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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Dispatched before beginning window overview. This will do any necessary | 78 // Dispatched before beginning window overview. This will do any necessary |
79 // one time actions such as restoring minimized windows. | 79 // one time actions such as restoring minimized windows. |
80 void PrepareForOverview(); | 80 void PrepareForOverview(); |
81 | 81 |
82 // Calculates and returns an optimal scale ratio. With MD this is only | 82 // Calculates and returns an optimal scale ratio. With MD this is only |
83 // taking into account |size.height()| as the width can vary. Without MD this | 83 // taking into account |size.height()| as the width can vary. Without MD this |
84 // returns the scale that allows the item to fully fit within |size|. | 84 // returns the scale that allows the item to fully fit within |size|. |
85 float GetItemScale(const gfx::Size& size); | 85 float GetItemScale(const gfx::Size& size); |
86 | 86 |
| 87 // Returns the union of the original target bounds of all transformed windows |
| 88 // managed by |this| item, i.e. all regular (normal or panel transient |
| 89 // descendants of the window returned by GetWindow()). |
| 90 gfx::Rect GetTargetBoundsInScreen() const; |
| 91 |
87 // Sets the bounds of this window selector item to |target_bounds| in the | 92 // Sets the bounds of this window selector item to |target_bounds| in the |
88 // |root_window_| root window. The bounds change will be animated as specified | 93 // |root_window_| root window. The bounds change will be animated as specified |
89 // by |animation_type|. | 94 // by |animation_type|. |
90 void SetBounds(const gfx::Rect& target_bounds, | 95 void SetBounds(const gfx::Rect& target_bounds, |
91 OverviewAnimationType animation_type); | 96 OverviewAnimationType animation_type); |
92 | 97 |
93 // Activates or deactivates selection depending on |selected|. | 98 // Activates or deactivates selection depending on |selected|. |
94 // Currently does nothing unless Material Design is enabled. With Material | 99 // Currently does nothing unless Material Design is enabled. With Material |
95 // Design the item's caption is shown transparent in selected state and blends | 100 // Design the item's caption is shown transparent in selected state and blends |
96 // with the selection widget. | 101 // with the selection widget. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // shape. This has performance implications so it can be disabled when there | 221 // shape. This has performance implications so it can be disabled when there |
217 // are many windows. | 222 // are many windows. |
218 static bool use_shape_; | 223 static bool use_shape_; |
219 | 224 |
220 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); | 225 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); |
221 }; | 226 }; |
222 | 227 |
223 } // namespace ash | 228 } // namespace ash |
224 | 229 |
225 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ | 230 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ |
OLD | NEW |