Commit 9cfd4f48 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Fix crash caused by incorrect static cast

Bug: 1020530
Change-Id: I8fdbd312edb9e98ffa2f089b7d227c4065e416c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912901Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarTim Song <tengs@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714710}
parent c75c5d25
......@@ -163,7 +163,7 @@ int FeaturePodsContainerView::GetVisibleCount() const {
});
}
void FeaturePodsContainerView::EnsurePageWithButton(FeaturePodButton* button) {
void FeaturePodsContainerView::EnsurePageWithButton(views::View* button) {
int index = visible_buttons_.GetIndexOfView(button->parent());
if (index < 0)
return;
......
......@@ -51,7 +51,7 @@ class ASH_EXPORT FeaturePodsContainerView : public views::View,
int GetVisibleCount() const;
// Make sure button is visible by switching page if needed.
void EnsurePageWithButton(FeaturePodButton* button);
void EnsurePageWithButton(views::View* button);
// views::View:
gfx::Size CalculatePreferredSize() const override;
......
......@@ -569,8 +569,7 @@ void UnifiedSystemTrayView::OnDidChangeFocus(views::View* before,
return;
if (feature_pods_container_->Contains(now)) {
feature_pods_container_->EnsurePageWithButton(
static_cast<FeaturePodButton*>(now));
feature_pods_container_->EnsurePageWithButton(now);
}
views::View* first_view = GetFirstFocusableChild();
......
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