Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(949)

Unified Diff: ash/common/wm/overview/window_selector_controller.h

Issue 2141133002: [ash-md] Animates overview shield in and out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Completes shield opacity animation after overview closes (avoids crashes with delayed anim… Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/common/wm/overview/window_selector_controller.h
diff --git a/ash/common/wm/overview/window_selector_controller.h b/ash/common/wm/overview/window_selector_controller.h
index 319d68e5e20dc2056b433cb4b873dbd55c0fafae..ecc375e03cf478a784bd5c89b3de4d1ebf61e856 100644
--- a/ash/common/wm/overview/window_selector_controller.h
+++ b/ash/common/wm/overview/window_selector_controller.h
@@ -44,6 +44,10 @@ class ASH_EXPORT WindowSelectorController : public WindowSelectorDelegate {
// WindowSelectorDelegate:
void OnSelectionEnded() override;
+ void AddDelayedAnimationObserver(
+ std::unique_ptr<DelayedAnimationObserver> animation) override;
+ void RemoveDelayedAnimationObserver(
bruthig 2016/07/15 17:05:38 This might be better named as RemoveAndDestroyAnim
varkha 2016/07/15 18:53:36 Done.
+ DelayedAnimationObserver* animation) override;
private:
friend class WindowSelectorTest;
@@ -51,6 +55,11 @@ class ASH_EXPORT WindowSelectorController : public WindowSelectorDelegate {
// Dispatched when window selection begins.
void OnSelectionStarted();
+ // Collection of DelayedAnimationObserver objects that own widgets that may be
+ // still animating after overview mode ends. If shell needs to shut down while
+ // those animations are in progress, the animations are shut down and the
+ // widgets destroyed.
+ std::vector<std::unique_ptr<DelayedAnimationObserver>> delayed_animations_;
std::unique_ptr<WindowSelector> window_selector_;
base::Time last_selection_time_;

Powered by Google App Engine
This is Rietveld 408576698