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

Unified Diff: ash/system/toast/toast_overlay.h

Issue 1841563003: ARC Toast: Prevent onClosed event from being called multiple times (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/system/toast/toast_overlay.h
diff --git a/ash/system/toast/toast_overlay.h b/ash/system/toast/toast_overlay.h
index 4bb3c5522c7540ef05917435db8d36dc5016f181..67f66d20834140a5552fef9cc4c4238a0f129ad0 100644
--- a/ash/system/toast/toast_overlay.h
+++ b/ash/system/toast/toast_overlay.h
@@ -44,23 +44,27 @@ class ASH_EXPORT ToastOverlay : public ui::LayerAnimationObserver {
private:
friend class ToastManagerTest;
+ void OnAnimationStopped();
+
// Returns the current bounds of the overlay, which is based on visibility.
gfx::Rect CalculateOverlayBounds();
// gfx::LayerAnimationObserver overrides:
+ void OnLayerAnimationStarted(ui::LayerAnimationSequence* sequence) override;
void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) override;
void OnLayerAnimationAborted(ui::LayerAnimationSequence* sequence) override;
void OnLayerAnimationScheduled(ui::LayerAnimationSequence* sequence) override;
+ bool RequiresNotificationWhenAnimatorDestroyed() const override;
views::Widget* widget_for_testing();
void ClickDismissButtonForTesting(const ui::Event& event);
- bool is_visible_ = false;
Delegate* const delegate_;
const std::string text_;
scoped_ptr<views::Widget> overlay_widget_;
scoped_ptr<ToastOverlayView> overlay_view_;
gfx::Size widget_size_;
+ std::set<ui::LayerAnimationSequence*> inflight_animations_;
DISALLOW_COPY_AND_ASSIGN(ToastOverlay);
};

Powered by Google App Engine
This is Rietveld 408576698