Commit 4dd5a83f authored by Tim Song's avatar Tim Song Committed by Commit Bot

App List: Hide transient child dialogs when animating home launcher.

Currently, the uninstall/app info dialog is not being hidden when overview mode
is toggled while in tablet (home launcher) mode.

TEST=manual + unit test
BUG=991140

Change-Id: I7fd95a14e1b74f244f57834cbffd145e59624c20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775384Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695877}
parent 4f13f7f8
...@@ -8,11 +8,13 @@ ...@@ -8,11 +8,13 @@
#include "ash/home_screen/home_screen_controller.h" #include "ash/home_screen/home_screen_controller.h"
#include "ash/home_screen/home_screen_delegate.h" #include "ash/home_screen/home_screen_delegate.h"
#include "ash/wm/window_util.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h" #include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_element.h" #include "ui/compositor/layer_animation_element.h"
#include "ui/compositor/layer_animator.h" #include "ui/compositor/layer_animator.h"
...@@ -95,6 +97,20 @@ void HomeScreenPresenter::ScheduleOverviewModeAnimation(bool start, ...@@ -95,6 +97,20 @@ void HomeScreenPresenter::ScheduleOverviewModeAnimation(bool start,
overview_animation_metrics_reporter_->Start(start); overview_animation_metrics_reporter_->Start(start);
} }
// Hide all transient child windows in the app list (e.g. uninstall dialog)
// before starting the overview mode transition, and restore them when
// reshowing the app list.
aura::Window* app_list_window =
controller_->delegate()->GetHomeScreenWindow();
if (app_list_window) {
for (auto* child : wm::GetTransientChildren(app_list_window)) {
if (start)
child->Hide();
else
child->Show();
}
}
controller_->delegate()->UpdateYPositionAndOpacityForHomeLauncher( controller_->delegate()->UpdateYPositionAndOpacityForHomeLauncher(
start ? kOverviewAnimationYOffset : 0, start ? 0.f : 1.f, start ? kOverviewAnimationYOffset : 0, start ? 0.f : 1.f,
animate ? base::BindRepeating(&UpdateOverviewSettings, animate ? base::BindRepeating(&UpdateOverviewSettings,
......
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