Chromium Code Reviews| Index: ash/wm/overview/window_selector_item.h |
| diff --git a/ash/wm/overview/window_selector_item.h b/ash/wm/overview/window_selector_item.h |
| index eedf3e1f9153c56f33d0073018cb147bbf2e091a..8b5d6da4941b2d5d475483bc9aa2ce4785be4203 100644 |
| --- a/ash/wm/overview/window_selector_item.h |
| +++ b/ash/wm/overview/window_selector_item.h |
| @@ -6,22 +6,34 @@ |
| #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ |
| #include "base/compiler_specific.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/strings/string16.h" |
| #include "ui/gfx/rect.h" |
| namespace aura { |
| class Window; |
| } |
| +namespace views { |
| +class Widget; |
| +} |
| + |
| namespace ash { |
| // This class represents an item in overview mode. An item can have one or more |
| // windows, of which only one can be activated by keyboard (i.e. alt+tab) but |
| // any can be selected with a pointer (touch or mouse). |
| class WindowSelectorItem { |
| + friend class WindowSelectorTest; |
|
flackr
2014/04/17 03:44:29
This belongs at the beginning of private: section.
Nina
2014/04/17 15:02:19
Done.
|
| + |
| public: |
| WindowSelectorItem(); |
| virtual ~WindowSelectorItem(); |
| + // The time for the close buttons and labels to fade in when initially shown |
| + // on entering overview mode. |
| + static const int kFadeInMilliseconds; |
| + |
| // Returns the root window on which this item is shown. |
| virtual aura::Window* GetRootWindow() = 0; |
| @@ -39,6 +51,7 @@ class WindowSelectorItem { |
| // Returns the |window| to activate on selecting of this item. |
| virtual aura::Window* SelectionWindow() = 0; |
| + virtual const aura::Window* SelectionWindow() const = 0; |
|
flackr
2014/04/17 03:44:29
I don't think you need the const version of this a
Nina
2014/04/17 15:02:19
Done.
|
| // Removes |window| from this item. Check empty() after calling this to see |
| // if the entire item is now empty. |
| @@ -74,6 +87,10 @@ class WindowSelectorItem { |
| // Sets the bounds used by the selector item's windows. |
| void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; } |
| + // Creates a label to display under the window selector item. |
| + void UpdateWindowLabels(const gfx::Rect& target_bounds, |
| + aura::Window* root_window); |
| + |
| private: |
| // The root window this item is being displayed on. |
| aura::Window* root_window_; |
| @@ -90,6 +107,9 @@ class WindowSelectorItem { |
| // a window layer for display on another monitor. |
| bool in_bounds_update_; |
| + // Label under the window displaying its active tab name. |
| + scoped_ptr<views::Widget> window_label_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); |
| }; |