Commit c922572f authored by Allen Bauer's avatar Allen Bauer Committed by Commit Bot

Removed usage of set_owned_by_client().

TopIconAnimationView

Bug: 1044687
Change-Id: Ifdaf646043e5e86d593ddf23aed49fbc6d60f3ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207733
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770339}
parent 98724041
...@@ -72,9 +72,6 @@ void TopIconAnimationView::RemoveObserver(TopIconAnimationObserver* observer) { ...@@ -72,9 +72,6 @@ void TopIconAnimationView::RemoveObserver(TopIconAnimationObserver* observer) {
} }
void TopIconAnimationView::TransformView() { void TopIconAnimationView::TransformView() {
// This view will delete itself on animation completion.
set_owned_by_client();
// Transform used for scaling down the icon and move it back inside to the // Transform used for scaling down the icon and move it back inside to the
// original folder icon. The transform's origin is this view's origin. // original folder icon. The transform's origin is this view's origin.
gfx::Transform transform; gfx::Transform transform;
...@@ -140,7 +137,9 @@ void TopIconAnimationView::OnImplicitAnimationsCompleted() { ...@@ -140,7 +137,9 @@ void TopIconAnimationView::OnImplicitAnimationsCompleted() {
SetVisible(false); SetVisible(false);
for (auto& observer : observers_) for (auto& observer : observers_)
observer.OnTopIconAnimationsComplete(this); observer.OnTopIconAnimationsComplete(this);
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); DCHECK(parent());
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(
FROM_HERE, parent()->RemoveChildViewT(this));
} }
bool TopIconAnimationView::RequiresNotificationWhenAnimatorDestroyed() const { bool TopIconAnimationView::RequiresNotificationWhenAnimatorDestroyed() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment