Commit 0423dde5 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Use SizeToContents in MediaDialogView

Replaces OnAnchorBoundsChanged calls, these were not called due to
anchor changes.

Bug: None
Change-Id: I26988ca55b019e0504e54fd0f37af45309b9b25b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874712
Commit-Queue: Peter Boström <pbos@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: default avatarTommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708421}
parent d9aaa044
......@@ -70,7 +70,7 @@ MediaNotificationContainerImpl* MediaDialogView::ShowMediaSession(
observed_containers_[id] = container_ptr;
active_sessions_view_->ShowNotification(id, std::move(container));
OnAnchorBoundsChanged();
SizeToContents();
for (auto& observer : observers_)
observer.OnMediaSessionShown();
......@@ -84,7 +84,7 @@ void MediaDialogView::HideMediaSession(const std::string& id) {
if (active_sessions_view_->empty())
HideDialog();
else
OnAnchorBoundsChanged();
SizeToContents();
for (auto& observer : observers_)
observer.OnMediaSessionHidden();
......@@ -125,7 +125,7 @@ gfx::Size MediaDialogView::CalculatePreferredSize() const {
}
void MediaDialogView::OnContainerExpanded(bool expanded) {
OnAnchorBoundsChanged();
SizeToContents();
}
void MediaDialogView::OnContainerMetadataChanged() {
......
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