Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index 5cd7aa99c0152733fab94f36b5226153f6579e37..3de91a5c258387de541a214dedc599eb8fb7cb37 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -56,7 +56,6 @@ |
#include "ash/system/tray/system_tray_delegate.h" |
#include "ash/system/tray/system_tray_notifier.h" |
#include "ash/utility/partial_screenshot_controller.h" |
-#include "ash/wm/app_list_controller.h" |
#include "ash/wm/ash_focus_rules.h" |
#include "ash/wm/ash_native_cursor_manager.h" |
#include "ash/wm/coordinate_conversion.h" |
@@ -83,6 +82,7 @@ |
#include "ash/wm/workspace_controller.h" |
#include "base/bind.h" |
#include "base/trace_event/trace_event.h" |
+#include "ui/app_list/app_list_controller.h" |
#include "ui/aura/client/aura_constants.h" |
#include "ui/aura/env.h" |
#include "ui/aura/layout_manager.h" |
@@ -296,19 +296,15 @@ void Shell::ShowAppList(aura::Window* window) { |
// If the context window is not given, show it on the target root window. |
if (!window) |
window = GetTargetRootWindow(); |
- if (!app_list_controller_) |
- app_list_controller_.reset(new AppListController); |
- app_list_controller_->Show(window); |
+ delegate_->GetAppListController()->Show(window); |
} |
void Shell::DismissAppList() { |
- if (!app_list_controller_) |
- return; |
- app_list_controller_->Dismiss(); |
+ delegate_->GetAppListController()->Dismiss(); |
} |
void Shell::ToggleAppList(aura::Window* window) { |
- if (app_list_controller_ && app_list_controller_->IsVisible()) { |
+ if (delegate_->GetAppListController()->IsVisible()) { |
DismissAppList(); |
return; |
} |
@@ -317,17 +313,7 @@ void Shell::ToggleAppList(aura::Window* window) { |
} |
bool Shell::GetAppListTargetVisibility() const { |
- return app_list_controller_.get() && |
- app_list_controller_->GetTargetVisibility(); |
-} |
- |
-aura::Window* Shell::GetAppListWindow() { |
- return app_list_controller_.get() ? app_list_controller_->GetWindow() |
- : nullptr; |
-} |
- |
-app_list::AppListView* Shell::GetAppListView() { |
- return app_list_controller_.get() ? app_list_controller_->GetView() : nullptr; |
+ return delegate_->GetAppListController()->IsVisible(); |
} |
bool Shell::IsSystemModalWindowOpen() const { |
@@ -711,12 +697,6 @@ Shell::~Shell() { |
// need to be removed. |
maximize_mode_controller_.reset(); |
- // AppList needs to be released before shelf layout manager, which is |
- // destroyed with shelf container in the loop below. However, app list |
- // container is now on top of shelf container and released after it. |
- // TODO(xiyuan): Move it back when app list container is no longer needed. |
- app_list_controller_.reset(); |
- |
#if defined(OS_CHROMEOS) |
// Destroy the LastWindowClosedLogoutReminder before the |
// LogoutConfirmationController. |