| Index: ash/wm/app_list_controller.cc
|
| diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
|
| index 2abb2b94b561387b74ddf93f724aa7eb11f648d4..1e668f8f49351a9f0c4b33cf8374d83a9d94f796 100644
|
| --- a/ash/wm/app_list_controller.cc
|
| +++ b/ash/wm/app_list_controller.cc
|
| @@ -153,22 +153,17 @@ aura::Window* AppListController::GetWindow() {
|
|
|
| void AppListController::SetView(app_list::AppListView* view) {
|
| DCHECK(view_ == NULL);
|
| + DCHECK(is_visible_);
|
|
|
| - if (is_visible_) {
|
| - view_ = view;
|
| - views::Widget* widget = view_->GetWidget();
|
| - widget->AddObserver(this);
|
| - Shell::GetInstance()->AddPreTargetHandler(this);
|
| - Launcher::ForWindow(GetWindow())->AddIconObserver(this);
|
| - widget->GetNativeView()->GetRootWindow()->AddRootWindowObserver(this);
|
| - aura::client::GetFocusClient(widget->GetNativeView())->AddObserver(this);
|
| - widget->SetOpacity(0);
|
| - ScheduleAnimation();
|
| + view_ = view;
|
| + views::Widget* widget = view_->GetWidget();
|
| + widget->AddObserver(this);
|
| + Shell::GetInstance()->AddPreTargetHandler(this);
|
| + Launcher::ForWindow(GetWindow())->AddIconObserver(this);
|
| + widget->GetNativeView()->GetRootWindow()->AddRootWindowObserver(this);
|
| + aura::client::GetFocusClient(widget->GetNativeView())->AddObserver(this);
|
|
|
| - view_->GetWidget()->Show();
|
| - } else {
|
| - view->GetWidget()->Close();
|
| - }
|
| + view_->ShowWhenReady();
|
| }
|
|
|
| void AppListController::ResetView() {
|
|
|