| 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 2af8c5682c81020c89ae7c8f0882b8bc5eef0233..1b7f06aa8eb4b7993bf8b6564d016aabcf35377e 100644
|
| --- a/ash/wm/overview/window_selector_item.h
|
| +++ b/ash/wm/overview/window_selector_item.h
|
| @@ -7,31 +7,31 @@
|
|
|
| #include "ash/ash_export.h"
|
| #include "ash/wm/overview/scoped_transform_overview_window.h"
|
| -#include "ash/wm/overview/transparent_activate_window_button.h"
|
| -#include "ash/wm/overview/transparent_activate_window_button_delegate.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "ui/aura/scoped_window_targeter.h"
|
| #include "ui/aura/window_observer.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/views/controls/button/button.h"
|
| #include "ui/views/controls/button/image_button.h"
|
| +#include "ui/views/controls/button/label_button.h"
|
|
|
| namespace aura {
|
| class Window;
|
| }
|
|
|
| namespace views {
|
| -class Label;
|
| +class LabelButton;
|
| class Widget;
|
| }
|
|
|
| namespace ash {
|
|
|
| +class OverviewWindowTargeter;
|
| +
|
| // This class represents an item in overview mode.
|
| -class ASH_EXPORT WindowSelectorItem
|
| - : public views::ButtonListener,
|
| - public aura::WindowObserver,
|
| - public TransparentActivateWindowButtonDelegate {
|
| +class ASH_EXPORT WindowSelectorItem : public views::ButtonListener,
|
| + public aura::WindowObserver {
|
| public:
|
| explicit WindowSelectorItem(aura::Window* window);
|
| ~WindowSelectorItem() override;
|
| @@ -83,12 +83,12 @@ class ASH_EXPORT WindowSelectorItem
|
| void OnWindowDestroying(aura::Window* window) override;
|
| void OnWindowTitleChanged(aura::Window* window) override;
|
|
|
| - // ash::TransparentActivateWindowButtonDelegate:
|
| - void Select() override;
|
| -
|
| private:
|
| friend class WindowSelectorTest;
|
|
|
| + // LabelButton shown under each of the windows.
|
| + class OverviewLabelButton;
|
| +
|
| // Sets the bounds of this selector's items to |target_bounds| in
|
| // |root_window_|. The bounds change will be animated as specified
|
| // by |animation_type|.
|
| @@ -98,18 +98,13 @@ class ASH_EXPORT WindowSelectorItem
|
| // Changes the opacity of all the windows the item owns.
|
| void SetOpacity(float opacity);
|
|
|
| - // Updates the window label's bounds to |target_bounds|. Will create a new
|
| - // window label and fade it in if it doesn't exist. The bounds change is
|
| + // Updates the window label's bounds to |target_bounds|. The bounds change is
|
| // animated as specified by the |animation_type|.
|
| void UpdateWindowLabels(const gfx::Rect& target_bounds,
|
| OverviewAnimationType animation_type);
|
|
|
| // Initializes window_label_.
|
| - void CreateWindowLabel(const base::string16& title);
|
| -
|
| - // Updates the bounds and accessibility names for all the transparent
|
| - // overlays.
|
| - void UpdateSelectorButtons();
|
| + void CreateWindowLabel();
|
|
|
| // Updates the close button's bounds. Any change in bounds will be animated
|
| // from the current bounds to the new bounds as per the |animation_type|.
|
| @@ -139,8 +134,8 @@ class ASH_EXPORT WindowSelectorItem
|
| // Label under the window displaying its active tab name.
|
| scoped_ptr<views::Widget> window_label_;
|
|
|
| - // View for the label under the window.
|
| - views::Label* window_label_view_;
|
| + // View for the label button under the window.
|
| + OverviewLabelButton* window_label_button_view_;
|
|
|
| // The close buttons widget container.
|
| views::Widget close_button_widget_;
|
| @@ -149,11 +144,11 @@ class ASH_EXPORT WindowSelectorItem
|
| // close_button_widget_.
|
| views::ImageButton* close_button_;
|
|
|
| - // Transparent overlay that covers the entire bounds of the
|
| - // WindowSelectorItem and is stacked in front of all windows but behind each
|
| - // Windows' own TransparentActivateWindowButton.
|
| - scoped_ptr<TransparentActivateWindowButton>
|
| - selector_item_activate_window_button_;
|
| + // Reference to the targeter implemented by the scoped window targeter.
|
| + OverviewWindowTargeter* overview_window_targeter_;
|
| +
|
| + // Stores and restores on exit the actual window targeter.
|
| + scoped_ptr<aura::ScopedWindowTargeter> scoped_window_targeter_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
|
| };
|
|
|