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_PANELS_H_ | 5 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_PANELS_H_ |
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_PANELS_H_ | 6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_PANELS_H_ |
7 | 7 |
8 #include "ash/wm/overview/window_selector_item.h" | 8 #include "ash/wm/overview/window_selector_item.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
12 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
13 | 13 |
14 namespace ash { | 14 namespace ash { |
15 | 15 |
16 class ScopedTransformOverviewWindow; | 16 class ScopedTransformOverviewWindow; |
17 | 17 |
18 // This class implements a window selector item containing one or more attached | 18 // This class implements a window selector item containing one or more attached |
19 // panel windows. These panels are grouped into a single overview item in | 19 // panel windows. These panels are grouped into a single overview item in |
20 // overview mode and the callout arrows are hidden at this point. | 20 // overview mode and the callout arrows are hidden at this point. |
21 class WindowSelectorPanels : public WindowSelectorItem { | 21 class WindowSelectorPanels : public WindowSelectorItem { |
22 public: | 22 public: |
23 explicit WindowSelectorPanels(aura::Window* panels_root_window); | 23 explicit WindowSelectorPanels(aura::Window* panels_root_window); |
24 virtual ~WindowSelectorPanels(); | 24 ~WindowSelectorPanels() override; |
25 | 25 |
26 // Adds |window| to the selector item. This window should be an attached | 26 // Adds |window| to the selector item. This window should be an attached |
27 // panel window. | 27 // panel window. |
28 void AddWindow(aura::Window* window); | 28 void AddWindow(aura::Window* window); |
29 | 29 |
30 // WindowSelectorItem: | 30 // WindowSelectorItem: |
31 virtual aura::Window* GetRootWindow() override; | 31 aura::Window* GetRootWindow() override; |
32 virtual bool HasSelectableWindow(const aura::Window* window) override; | 32 bool HasSelectableWindow(const aura::Window* window) override; |
33 virtual bool Contains(const aura::Window* target) override; | 33 bool Contains(const aura::Window* target) override; |
34 virtual void RestoreWindowOnExit(aura::Window* window) override; | 34 void RestoreWindowOnExit(aura::Window* window) override; |
35 virtual aura::Window* SelectionWindow() override; | 35 aura::Window* SelectionWindow() override; |
36 virtual void RemoveWindow(const aura::Window* window) override; | 36 void RemoveWindow(const aura::Window* window) override; |
37 virtual bool empty() const override; | 37 bool empty() const override; |
38 virtual void PrepareForOverview() override; | 38 void PrepareForOverview() override; |
39 virtual void SetItemBounds(aura::Window* root_window, | 39 void SetItemBounds(aura::Window* root_window, |
40 const gfx::Rect& target_bounds, | 40 const gfx::Rect& target_bounds, |
41 bool animate) override; | 41 bool animate) override; |
42 virtual void SetOpacity(float opacity) override; | 42 void SetOpacity(float opacity) override; |
43 | 43 |
44 private: | 44 private: |
45 typedef ScopedVector<ScopedTransformOverviewWindow> WindowList; | 45 typedef ScopedVector<ScopedTransformOverviewWindow> WindowList; |
46 WindowList transform_windows_; | 46 WindowList transform_windows_; |
47 | 47 |
48 // The root window of the panels this item contains. | 48 // The root window of the panels this item contains. |
49 aura::Window* panels_root_window_; | 49 aura::Window* panels_root_window_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(WindowSelectorPanels); | 51 DISALLOW_COPY_AND_ASSIGN(WindowSelectorPanels); |
52 }; | 52 }; |
53 | 53 |
54 } // namespace ash | 54 } // namespace ash |
55 | 55 |
56 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_PANELS_H_ | 56 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_PANELS_H_ |
OLD | NEW |