Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: ash/shell.cc

Issue 1861013004: AppListController refactoring part 3: Switching over to use AppListShower in Ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus_chrome_delegates_ash_impl
Patch Set: Rebase. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index b4972ec0a3a2024221a3e77d605e06c855dc8caa..751706c4682cfea6612abfa08dc95390ac6f8c18 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -57,7 +57,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"
@@ -85,6 +84,7 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
+#include "ui/app_list/shower/app_list_shower.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/layout_manager.h"
@@ -298,19 +298,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_->GetAppListShower()->Show(window);
}
void Shell::DismissAppList() {
- if (!app_list_controller_)
- return;
- app_list_controller_->Dismiss();
+ delegate_->GetAppListShower()->Dismiss();
}
void Shell::ToggleAppList(aura::Window* window) {
- if (app_list_controller_ && app_list_controller_->IsVisible()) {
+ if (delegate_->GetAppListShower()->IsVisible()) {
DismissAppList();
return;
}
@@ -319,17 +315,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_->GetAppListShower()->GetTargetVisibility();
}
bool Shell::IsSystemModalWindowOpen() const {
@@ -718,12 +704,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.
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698