| Index: ui/app_list/presenter/app_list_presenter_impl.cc
|
| diff --git a/ui/app_list/presenter/app_list_presenter_impl.cc b/ui/app_list/presenter/app_list_presenter_impl.cc
|
| index e6db16a76d1a001b89936e5dee210b80e819e52d..21b0414fd47181ce1301f60364f8565d14ec9588 100644
|
| --- a/ui/app_list/presenter/app_list_presenter_impl.cc
|
| +++ b/ui/app_list/presenter/app_list_presenter_impl.cc
|
| @@ -57,6 +57,9 @@ void AppListPresenterImpl::Show(int64_t display_id) {
|
| return;
|
|
|
| is_visible_ = true;
|
| + if (app_list_)
|
| + app_list_->OnTargetVisibilityChanged(GetTargetVisibility());
|
| +
|
| if (view_) {
|
| ScheduleAnimation();
|
| } else {
|
| @@ -80,6 +83,8 @@ void AppListPresenterImpl::Dismiss() {
|
| DCHECK(view_);
|
|
|
| is_visible_ = false;
|
| + if (app_list_)
|
| + app_list_->OnTargetVisibilityChanged(GetTargetVisibility());
|
|
|
| // The dismissal may have occurred in response to the app list losing
|
| // activation. Otherwise, our widget is currently active. When the animation
|
| @@ -110,6 +115,14 @@ bool AppListPresenterImpl::GetTargetVisibility() const {
|
| return is_visible_;
|
| }
|
|
|
| +void AppListPresenterImpl::SetAppList(mojom::AppListPtr app_list) {
|
| + DCHECK(app_list);
|
| + app_list_ = std::move(app_list);
|
| + // Notify the app list interface of the current [target] visibility.
|
| + app_list_->OnTargetVisibilityChanged(GetTargetVisibility());
|
| + app_list_->OnVisibilityChanged(IsVisible());
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // AppListPresenterImpl, private:
|
|
|
| @@ -211,12 +224,19 @@ void AppListPresenterImpl::OnImplicitAnimationsCompleted() {
|
| // AppListPresenterImpl, views::WidgetObserver implementation:
|
|
|
| void AppListPresenterImpl::OnWidgetDestroying(views::Widget* widget) {
|
| - DCHECK(view_->GetWidget() == widget);
|
| + DCHECK_EQ(view_->GetWidget(), widget);
|
| if (is_visible_)
|
| Dismiss();
|
| ResetView();
|
| }
|
|
|
| +void AppListPresenterImpl::OnWidgetVisibilityChanged(views::Widget* widget,
|
| + bool visible) {
|
| + DCHECK_EQ(view_->GetWidget(), widget);
|
| + if (app_list_)
|
| + app_list_->OnVisibilityChanged(visible);
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // AppListPresenterImpl, PaginationModelObserver implementation:
|
|
|
|
|