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..6aa744b8f2a0f2319998cec6bb11c39a1694f9bc 100644 |
--- a/ash/wm/overview/window_selector_item.h |
+++ b/ash/wm/overview/window_selector_item.h |
@@ -7,10 +7,9 @@ |
#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" |
@@ -21,17 +20,17 @@ 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,9 +82,6 @@ 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; |
@@ -98,18 +94,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 +130,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. |
tdanderson
2015/01/21 17:24:24
Mention in your CL description why you're now usin
Nina
2015/01/22 19:44:32
Done.
|
+ views::LabelButton* window_label_button_view_; |
// The close buttons widget container. |
views::Widget close_button_widget_; |
@@ -149,11 +140,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); |
}; |