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

Unified Diff: ash/common/wm/overview/window_selector_delegate.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_delegate.h
diff --git a/ash/common/wm/overview/window_selector_delegate.h b/ash/common/wm/overview/window_selector_delegate.h
index 0e300b5f7466efe2d7079f3ebc11db7d5bd13675..f116a450798c5eafdda1755ed2f9b8311826a9f6 100644
--- a/ash/common/wm/overview/window_selector_delegate.h
+++ b/ash/common/wm/overview/window_selector_delegate.h
@@ -8,18 +8,37 @@
#include "ash/ash_export.h"
#include "base/compiler_specific.h"
-namespace aura {
-class Window;
-}
-
namespace ash {
+class WindowSelectorDelegate;
+
+class ASH_EXPORT DelayedAnimationObserver {
+ public:
+ virtual ~DelayedAnimationObserver() {}
+
+ // Sets a |delegate| that can be notified when |this| observer completes
+ // animation.
+ virtual void SetDelegate(WindowSelectorDelegate* delegate) = 0;
+
+ // Can be called by the |delegate| to delete the owned widget.
bruthig 2016/07/15 17:05:38 Is it true that if the owner of |this| calls shutd
varkha 2016/07/15 18:53:36 Done.
+ virtual void Shutdown() = 0;
+};
+
// Implement this class to handle the selection event from WindowSelector.
class ASH_EXPORT WindowSelectorDelegate {
public:
// Invoked if selection is ended.
virtual void OnSelectionEnded() = 0;
+ // Passes ownership of |animation_observer| to |this| delegate.
+ virtual void AddDelayedAnimationObserver(
bruthig 2016/07/15 17:05:38 Instead of overloading the WindowSelectorDelegate,
varkha 2016/07/15 18:53:36 I like the last suggestion. Done.
+ std::unique_ptr<DelayedAnimationObserver> animation_observer) = 0;
+
+ // Finds and erases |animation_observer| from the list deleting the widget
+ // owned by the |animation_observer|.
+ virtual void RemoveDelayedAnimationObserver(
+ DelayedAnimationObserver* animation_observer) = 0;
+
protected:
virtual ~WindowSelectorDelegate() {}
};

Powered by Google App Engine
This is Rietveld 408576698