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_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ | 5 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ |
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ | 6 #define ASH_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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 | 113 |
114 const gfx::Rect& target_bounds() const { return target_bounds_; } | 114 const gfx::Rect& target_bounds() const { return target_bounds_; } |
115 | 115 |
116 // views::ButtonListener: | 116 // views::ButtonListener: |
117 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 117 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
118 | 118 |
119 // aura::WindowObserver: | 119 // aura::WindowObserver: |
120 void OnWindowDestroying(aura::Window* window) override; | 120 void OnWindowDestroying(aura::Window* window) override; |
121 void OnWindowTitleChanged(aura::Window* window) override; | 121 void OnWindowTitleChanged(aura::Window* window) override; |
122 | 122 |
123 // Handle the mouse/gesture event on the window selector item. | |
varkha
2017/06/21 01:51:53
nit: How about "// Handle mouse/gesture events and
xdai1
2017/06/22 21:46:34
Done.
| |
124 void HandlePressEvent(const gfx::Point& location_in_screen); | |
125 void HandleReleaseEvent(const gfx::Point& location_in_screen); | |
126 void HandleDragEvent(const gfx::Point& location_in_screen); | |
127 | |
123 private: | 128 private: |
124 class CaptionContainerView; | 129 class CaptionContainerView; |
125 class RoundedContainerView; | 130 class RoundedContainerView; |
126 friend class WindowSelectorTest; | 131 friend class WindowSelectorTest; |
127 | 132 |
128 enum class HeaderFadeInMode { | 133 enum class HeaderFadeInMode { |
129 ENTER, | 134 ENTER, |
130 UPDATE, | 135 UPDATE, |
131 EXIT, | 136 EXIT, |
132 }; | 137 }; |
(...skipping 26 matching lines...) Expand all Loading... | |
159 void UpdateAccessibilityName(); | 164 void UpdateAccessibilityName(); |
160 | 165 |
161 // Fades out a window caption when exiting overview mode. | 166 // Fades out a window caption when exiting overview mode. |
162 void FadeOut(std::unique_ptr<views::Widget> widget); | 167 void FadeOut(std::unique_ptr<views::Widget> widget); |
163 | 168 |
164 // Allows a test to directly set animation state. | 169 // Allows a test to directly set animation state. |
165 gfx::SlideAnimation* GetBackgroundViewAnimation(); | 170 gfx::SlideAnimation* GetBackgroundViewAnimation(); |
166 | 171 |
167 aura::Window* GetOverviewWindowForMinimizedStateForTest(); | 172 aura::Window* GetOverviewWindowForMinimizedStateForTest(); |
168 | 173 |
174 // Called before dragging. Scale up the window a little bit to indicate its | |
varkha
2017/06/21 01:51:53
nit: Scale -> Scales
xdai1
2017/06/22 21:46:34
Done.
| |
175 // selection and stack the window at the top of the Z order in order to keep | |
176 // it visible while dragging around. | |
177 void PrepareDrag(); | |
varkha
2017/06/21 01:51:54
How about StartDrag() for symmetry?
xdai1
2017/06/22 21:46:34
Done.
| |
178 | |
179 // Called after dragging. Stack the window at the bottom of the Z order. | |
varkha
2017/06/21 01:51:54
nit: Stack -> Stacks.
xdai1
2017/06/22 21:46:34
Done.
| |
180 void EndDrag(); | |
181 | |
169 // True if the item is being shown in the overview, false if it's being | 182 // True if the item is being shown in the overview, false if it's being |
170 // filtered. | 183 // filtered. |
171 bool dimmed_; | 184 bool dimmed_; |
172 | 185 |
173 // The root window this item is being displayed on. | 186 // The root window this item is being displayed on. |
174 aura::Window* root_window_; | 187 aura::Window* root_window_; |
175 | 188 |
176 // The contained Window's wrapper. | 189 // The contained Window's wrapper. |
177 ScopedTransformOverviewWindow transform_window_; | 190 ScopedTransformOverviewWindow transform_window_; |
178 | 191 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
214 // corners. This view can have its color and opacity animated. It has a layer | 227 // corners. This view can have its color and opacity animated. It has a layer |
215 // which is the only textured layer used by the |item_widget_|. | 228 // which is the only textured layer used by the |item_widget_|. |
216 RoundedContainerView* background_view_; | 229 RoundedContainerView* background_view_; |
217 | 230 |
218 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); | 231 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); |
219 }; | 232 }; |
220 | 233 |
221 } // namespace ash | 234 } // namespace ash |
222 | 235 |
223 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ | 236 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ |
OLD | NEW |