Chromium Code Reviews| Index: ash/common/wm/overview/window_selector_item.h |
| diff --git a/ash/common/wm/overview/window_selector_item.h b/ash/common/wm/overview/window_selector_item.h |
| index d3467685e639fd637ca260f2d90830debf0eee42..8b445c6e5cb50103c960c8403b92045171dc0ca6 100644 |
| --- a/ash/common/wm/overview/window_selector_item.h |
| +++ b/ash/common/wm/overview/window_selector_item.h |
| @@ -113,6 +113,11 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, |
| // Closes |transform_window_|. |
| void CloseWindow(); |
| + // Hides the original window header and sets shape or mask on a window. |
| + // When masks are used, rounded corner |radius| can be specified. |
| + // TODO(varkha): remove |radius|. |
| + void HideHeaderAndSetShape(int radius); |
| + |
| // Sets if the item is dimmed in the overview. Changing the value will also |
| // change the visibility of the transform windows. |
| void SetDimmed(bool dimmed); |
| @@ -131,6 +136,7 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, |
| private: |
| class CaptionContainerView; |
| + class RoundedContainerView; |
| friend class WindowSelectorTest; |
| // Sets the bounds of this selector's items to |target_bounds| in |
| @@ -161,6 +167,9 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, |
| // Updates the close buttons accessibility name. |
| void UpdateCloseButtonAccessibilityName(); |
| + // Fades out a window caption when exiting overview mode. |
| + void FadeOut(std::unique_ptr<views::Widget> widget); |
| + |
| static bool hide_header() { return use_mask_ || use_shape_; } |
| // True if the item is being shown in the overview, false if it's being |
| @@ -181,6 +190,14 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, |
| // a window layer for display on another monitor. |
| bool in_bounds_update_; |
| + // True when |this| item is visually selected. Item header is made transparent |
| + // when the item is selected. |
| + bool selected_; |
| + |
| + // True initially until the UpdateHeaderLayout is invoked for the first time. |
|
bruthig
2016/09/02 16:00:13
This seems inconsistent with where |first_time_upd
varkha
2016/09/02 21:38:37
I have removed this in favor for passing the stage
|
| + // Provided in order to set the initial bounds for the header to animate from. |
| + bool first_time_update_; |
| + |
| // Label displaying its name (active tab for tabbed windows). |
| // With Material Design this Widget owns |caption_container_view_| and is |
| // shown above the |transform_window_|. |
| @@ -190,9 +207,6 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, |
| // Shadow around the item in overview. |
| std::unique_ptr<::wm::Shadow> shadow_; |
| - // Label background widget used to fade in opacity when moving selection. |
| - std::unique_ptr<views::Widget> window_label_selector_; |
| - |
| // Container view that owns |window_label_button_view_| and |close_button_|. |
| // Only used with Material Design. |
| CaptionContainerView* caption_container_view_; |
| @@ -212,6 +226,10 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, |
| // Guaranteed to be non-null for the lifetime of |this|. |
| WindowSelector* window_selector_; |
| + // Pointer to a view that covers the original header and has rounded top |
| + // corners. This view can have its color and opacity animated. |
| + RoundedContainerView* background_view_; |
| + |
| // If true, mask the original window header while in overview and make corners |
| // rounded using a mask layer. This has performance implications so it can be |
| // disabled when there are many windows. |