| Index: ash/common/wm/overview/window_selector_item.cc
|
| diff --git a/ash/common/wm/overview/window_selector_item.cc b/ash/common/wm/overview/window_selector_item.cc
|
| index acbdfb1b75402001bc4ef32ae3fb70b80a2f4557..aa0431a9a2c38e9568a4240cab27b295cf4db26b 100644
|
| --- a/ash/common/wm/overview/window_selector_item.cc
|
| +++ b/ash/common/wm/overview/window_selector_item.cc
|
| @@ -33,6 +33,7 @@
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/compositor/layer_animation_sequence.h"
|
| #include "ui/compositor/scoped_animation_duration_scale_mode.h"
|
| +#include "ui/gfx/animation/slide_animation.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/color_utils.h"
|
| #include "ui/gfx/geometry/safe_integer_conversions.h"
|
| @@ -197,7 +198,10 @@ class WindowSelectorItem::RoundedContainerView
|
|
|
| ~RoundedContainerView() override { StopObservingLayerAnimations(); }
|
|
|
| - void OnItemRestored() { item_ = nullptr; }
|
| + void OnItemRestored() {
|
| + item_ = nullptr;
|
| + item_window_ = nullptr;
|
| + }
|
|
|
| // Starts observing layer animations so that actions can be taken when
|
| // particular animations (opacity) complete. It should only be called once
|
| @@ -216,6 +220,9 @@ class WindowSelectorItem::RoundedContainerView
|
| layer_ = nullptr;
|
| }
|
|
|
| + // Used by tests to set animation state.
|
| + gfx::SlideAnimation* animation() { return animation_.get(); }
|
| +
|
| void set_color(SkColor target_color) { target_color_ = target_color; }
|
|
|
| // Starts a color animation using |tween_type|. The animation will change the
|
| @@ -896,4 +903,8 @@ void WindowSelectorItem::FadeOut(std::unique_ptr<views::Widget> widget) {
|
| widget_ptr->SetOpacity(0.f);
|
| }
|
|
|
| +gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() {
|
| + return background_view_ ? background_view_->animation() : nullptr;
|
| +}
|
| +
|
| } // namespace ash
|
|
|