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

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

Issue 2203793003: [ash-md] Properly scales windows with transient parents in overview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « ash/common/wm/overview/window_grid.cc ('k') | ash/common/wm/overview/window_selector_item.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Dispatched before beginning window overview. This will do any necessary 74 // Dispatched before beginning window overview. This will do any necessary
75 // one time actions such as restoring minimized windows. 75 // one time actions such as restoring minimized windows.
76 void PrepareForOverview(); 76 void PrepareForOverview();
77 77
78 // Calculates and returns an optimal scale ratio. With MD this is only 78 // Calculates and returns an optimal scale ratio. With MD this is only
79 // taking into account |size.height()| as the width can vary. Without MD this 79 // taking into account |size.height()| as the width can vary. Without MD this
80 // returns the scale that allows the item to fully fit within |size|. 80 // returns the scale that allows the item to fully fit within |size|.
81 float GetItemScale(const gfx::Size& size); 81 float GetItemScale(const gfx::Size& size);
82 82
83 // Returns the union of the original target bounds of all transformed windows
84 // managed by |this| item, i.e. all regular (normal or panel transient
85 // descendants of the window returned by GetWindow()).
86 gfx::Rect GetTargetBoundsInScreen() const;
87
83 // Sets the bounds of this window selector item to |target_bounds| in the 88 // Sets the bounds of this window selector item to |target_bounds| in the
84 // |root_window_| root window. The bounds change will be animated as specified 89 // |root_window_| root window. The bounds change will be animated as specified
85 // by |animation_type|. 90 // by |animation_type|.
86 void SetBounds(const gfx::Rect& target_bounds, 91 void SetBounds(const gfx::Rect& target_bounds,
87 OverviewAnimationType animation_type); 92 OverviewAnimationType animation_type);
88 93
89 // Activates or deactivates selection depending on |selected|. 94 // Activates or deactivates selection depending on |selected|.
90 // Currently does nothing unless Material Design is enabled. With Material 95 // Currently does nothing unless Material Design is enabled. With Material
91 // Design the item's caption is shown transparent in selected state and blends 96 // Design the item's caption is shown transparent in selected state and blends
92 // with the selection widget. 97 // with the selection widget.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // shape. This has performance implications so it can be disabled when there 211 // shape. This has performance implications so it can be disabled when there
207 // are many windows. 212 // are many windows.
208 static bool use_shape_; 213 static bool use_shape_;
209 214
210 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); 215 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
211 }; 216 };
212 217
213 } // namespace ash 218 } // namespace ash
214 219
215 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 220 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_grid.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