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 584d2758929ac36442240948171031f7bb494e0e..20506e9e8177155bf93e05099308fa849336948e 100644 |
--- a/ash/wm/overview/window_selector_item.h |
+++ b/ash/wm/overview/window_selector_item.h |
@@ -27,30 +27,20 @@ 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). |
+// This class represents an item in overview mode. |
class ASH_EXPORT WindowSelectorItem |
: public views::ButtonListener, |
public aura::WindowObserver, |
public TransparentActivateWindowButtonDelegate { |
public: |
- explicit WindowSelectorItem(aura::Window* root_window); |
+ WindowSelectorItem(aura::Window* root_window, aura::Window* window); |
~WindowSelectorItem() override; |
+ aura::Window* GetWindow() const; |
+ |
// Returns the root window on which this item is shown. |
aura::Window* root_window() { return root_window_; } |
- // Adds a window to this selector item. Windows should be added in reverse |
- // visible order so that the transparent overlay ordering matches the visible |
- // ordering. Each |window| should have the same root window as |this| was |
- // instantiated with. |
- void AddWindow(aura::Window* window); |
- |
- // Returns true if the window selector item has |window| as a selectable |
- // window. |
- bool HasSelectableWindow(const aura::Window* window) const; |
- |
// Returns true if |target| is contained in this WindowSelectorItem. |
bool Contains(const aura::Window* target) const; |
@@ -58,26 +48,14 @@ class ASH_EXPORT WindowSelectorItem |
// to its previous state. |
void RestoreWindowOnExit(aura::Window* window); |
- // Returns the |window| to activate on selecting of this item. |
- aura::Window* SelectionWindow() const; |
- |
- // Removes |window| from this item. Check empty() after calling this to see |
- // if the entire item is now empty. |
- void RemoveWindow(const aura::Window* window); |
- |
- // Returns true if this item has no more selectable windows (i.e. after |
- // calling RemoveWindow for the last contained window). |
- bool empty() const; |
- |
// Dispatched before beginning window overview. This will do any necessary |
// one time actions such as restoring minimized windows. |
void PrepareForOverview(); |
// Sets the bounds of this window selector item to |target_bounds| in the |
- // |root_window| root window. The bounds change will be animated as specified |
+ // |root_window_| root window. The bounds change will be animated as specified |
// by |animation_type|. |
- void SetBounds(aura::Window* root_window, |
- const gfx::Rect& target_bounds, |
+ void SetBounds(const gfx::Rect& target_bounds, |
OverviewAnimationType animation_type); |
// Recomputes the positions for the windows in this selection item. This is |
@@ -95,10 +73,14 @@ class ASH_EXPORT WindowSelectorItem |
const gfx::Rect& target_bounds() const { return target_bounds_; } |
+ // Informs the WindowSelectorItem that the window being watched was destroyed. |
+ void OnWindowDestroyed(); |
+ |
// views::ButtonListener: |
void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
// aura::WindowObserver: |
+ using aura::WindowObserver::OnWindowDestroyed; |
jonross
2015/01/15 13:37:47
Remove this once OnWindowDestroyed above has been
bruthig
2015/01/15 18:27:25
Done.
|
void OnWindowTitleChanged(aura::Window* window) override; |
// ash::TransparentActivateWindowButtonDelegate: |
@@ -107,13 +89,10 @@ class ASH_EXPORT WindowSelectorItem |
private: |
friend class WindowSelectorTest; |
- typedef ScopedVector<ScopedTransformOverviewWindow> TransformWindows; |
- |
// Sets the bounds of this selector's items to |target_bounds| in |
- // |root_window|. The bounds change will be animated as specified |
+ // |root_window_|. The bounds change will be animated as specified |
// by |animation_type|. |
- void SetItemBounds(aura::Window* root_window, |
- const gfx::Rect& target_bounds, |
+ void SetItemBounds(const gfx::Rect& target_bounds, |
OverviewAnimationType animation_type); |
// Changes the opacity of all the windows the item owns. |
@@ -139,9 +118,6 @@ class ASH_EXPORT WindowSelectorItem |
// Updates the close buttons accessibility name. |
void UpdateCloseButtonAccessibilityName(); |
- // Returns the ScopedTransformOverviewWindow to activate or close. |
- ScopedTransformOverviewWindow* SelectionTransformWindow() const; |
- |
// True if the item is being shown in the overview, false if it's being |
// filtered. |
bool dimmed_; |
@@ -149,6 +125,9 @@ class ASH_EXPORT WindowSelectorItem |
// The root window this item is being displayed on. |
aura::Window* root_window_; |
+ // The contained Window's wrapper. |
+ ScopedTransformOverviewWindow transform_window_; |
+ |
// The target bounds this selector item is fit within. |
gfx::Rect target_bounds_; |
@@ -176,9 +155,6 @@ class ASH_EXPORT WindowSelectorItem |
scoped_ptr<TransparentActivateWindowButton> |
selector_item_activate_window_button_; |
- // List of all Windows added to this and their associated helper classes. |
- TransformWindows transform_windows_; |
- |
DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); |
}; |