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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // enabled. | 105 // enabled. |
106 void SendAccessibleSelectionEvent(); | 106 void SendAccessibleSelectionEvent(); |
107 | 107 |
108 // Closes |transform_window_|. | 108 // Closes |transform_window_|. |
109 void CloseWindow(); | 109 void CloseWindow(); |
110 | 110 |
111 // Sets if the item is dimmed in the overview. Changing the value will also | 111 // Sets if the item is dimmed in the overview. Changing the value will also |
112 // change the visibility of the transform windows. | 112 // change the visibility of the transform windows. |
113 void SetDimmed(bool dimmed); | 113 void SetDimmed(bool dimmed); |
114 bool dimmed() const { return dimmed_; } | 114 bool dimmed() const { return dimmed_; } |
| 115 void set_hide_header(bool hide_header) { hide_header_ = hide_header; } |
115 | 116 |
116 const gfx::Rect& target_bounds() const { return target_bounds_; } | 117 const gfx::Rect& target_bounds() const { return target_bounds_; } |
117 | 118 |
118 // views::ButtonListener: | 119 // views::ButtonListener: |
119 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 120 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
120 | 121 |
121 // WmWindowObserver: | 122 // WmWindowObserver: |
122 void OnWindowDestroying(WmWindow* window) override; | 123 void OnWindowDestroying(WmWindow* window) override; |
123 void OnWindowTitleChanged(WmWindow* window) override; | 124 void OnWindowTitleChanged(WmWindow* window) override; |
124 | 125 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 ScopedTransformOverviewWindow transform_window_; | 166 ScopedTransformOverviewWindow transform_window_; |
166 | 167 |
167 // The target bounds this selector item is fit within. | 168 // The target bounds this selector item is fit within. |
168 gfx::Rect target_bounds_; | 169 gfx::Rect target_bounds_; |
169 | 170 |
170 // True if running SetItemBounds. This prevents recursive calls resulting from | 171 // True if running SetItemBounds. This prevents recursive calls resulting from |
171 // the bounds update when calling ::wm::RecreateWindowLayers to copy | 172 // the bounds update when calling ::wm::RecreateWindowLayers to copy |
172 // a window layer for display on another monitor. | 173 // a window layer for display on another monitor. |
173 bool in_bounds_update_; | 174 bool in_bounds_update_; |
174 | 175 |
| 176 // If true, mask the original window header while in overview. This has |
| 177 // performance implications so it can be disabled when there are many windows. |
| 178 bool hide_header_; |
| 179 |
175 // Label displaying its name (active tab for tabbed windows). | 180 // Label displaying its name (active tab for tabbed windows). |
176 // With Material Design this Widget owns |caption_container_view_| and is | 181 // With Material Design this Widget owns |caption_container_view_| and is |
177 // shown above the |transform_window_|. | 182 // shown above the |transform_window_|. |
178 // Otherwise it is shown under the window. | 183 // Otherwise it is shown under the window. |
179 std::unique_ptr<views::Widget> window_label_; | 184 std::unique_ptr<views::Widget> window_label_; |
180 | 185 |
181 // Shadow around the item in overview. | 186 // Shadow around the item in overview. |
182 std::unique_ptr<::wm::Shadow> shadow_; | 187 std::unique_ptr<::wm::Shadow> shadow_; |
183 | 188 |
184 // Label background widget used to fade in opacity when moving selection. | 189 // Label background widget used to fade in opacity when moving selection. |
(...skipping 17 matching lines...) Expand all Loading... |
202 // Pointer to the WindowSelector that owns the WindowGrid containing |this|. | 207 // Pointer to the WindowSelector that owns the WindowGrid containing |this|. |
203 // Guaranteed to be non-null for the lifetime of |this|. | 208 // Guaranteed to be non-null for the lifetime of |this|. |
204 WindowSelector* window_selector_; | 209 WindowSelector* window_selector_; |
205 | 210 |
206 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); | 211 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); |
207 }; | 212 }; |
208 | 213 |
209 } // namespace ash | 214 } // namespace ash |
210 | 215 |
211 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ | 216 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ |
OLD | NEW |