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

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

Issue 2197773002: [ash-md] Properly scales windows with transient parents in overview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 original target bounds of all transformed windows.
tdanderson 2016/07/29 20:20:02 nit: explain in a bit more detail what you mean by
varkha 2016/07/29 20:45:12 Done.
88 gfx::Rect GetTargetBoundsInScreen() const;
89
87 // Sets the bounds of this window selector item to |target_bounds| in the 90 // 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 91 // |root_window_| root window. The bounds change will be animated as specified
89 // by |animation_type|. 92 // by |animation_type|.
90 void SetBounds(const gfx::Rect& target_bounds, 93 void SetBounds(const gfx::Rect& target_bounds,
91 OverviewAnimationType animation_type); 94 OverviewAnimationType animation_type);
92 95
93 // Activates or deactivates selection depending on |selected|. 96 // Activates or deactivates selection depending on |selected|.
94 // Currently does nothing unless Material Design is enabled. With Material 97 // Currently does nothing unless Material Design is enabled. With Material
95 // Design the item's caption is shown transparent in selected state and blends 98 // Design the item's caption is shown transparent in selected state and blends
96 // with the selection widget. 99 // with the selection widget.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // shape. This has performance implications so it can be disabled when there 219 // shape. This has performance implications so it can be disabled when there
217 // are many windows. 220 // are many windows.
218 static bool use_shape_; 221 static bool use_shape_;
219 222
220 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); 223 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
221 }; 224 };
222 225
223 } // namespace ash 226 } // namespace ash
224 227
225 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 228 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698