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

Unified Diff: chrome/browser/ui/ash/app_list/app_list_controller_ash.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
Index: chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
diff --git a/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc b/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
index 59e9819db4f30c523a2466bdd719b7a0dee8eb9d..d2a2424086d26d78136ad3b805005e753a5aafd8 100644
--- a/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
+++ b/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
@@ -10,25 +10,25 @@
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "extensions/common/extension.h"
+#include "ui/app_list/shower/app_list_shower_impl.h"
#include "ui/app_list/views/app_list_view.h"
-AppListControllerDelegateAsh::AppListControllerDelegateAsh() {}
+AppListControllerDelegateAsh::AppListControllerDelegateAsh(
+ app_list::AppListShowerImpl* app_list_shower)
+ : app_list_shower_(app_list_shower) {}
AppListControllerDelegateAsh::~AppListControllerDelegateAsh() {}
void AppListControllerDelegateAsh::DismissView() {
- DCHECK(ash::Shell::HasInstance());
- ash::Shell::GetInstance()->DismissAppList();
+ app_list_shower_->Dismiss();
}
gfx::NativeWindow AppListControllerDelegateAsh::GetAppListWindow() {
- DCHECK(ash::Shell::HasInstance());
- return ash::Shell::GetInstance()->GetAppListWindow();
+ return app_list_shower_->GetWindow();
}
gfx::Rect AppListControllerDelegateAsh::GetAppListBounds() {
- app_list::AppListView* app_list_view =
- ash::Shell::GetInstance()->GetAppListView();
+ app_list::AppListView* app_list_view = app_list_shower_->GetView();
if (app_list_view)
return app_list_view->GetBoundsInScreen();
return gfx::Rect();
@@ -59,15 +59,13 @@ AppListControllerDelegate::Pinnable AppListControllerDelegateAsh::GetPinnable(
}
void AppListControllerDelegateAsh::OnShowChildDialog() {
- app_list::AppListView* app_list_view =
- ash::Shell::GetInstance()->GetAppListView();
+ app_list::AppListView* app_list_view = app_list_shower_->GetView();
if (app_list_view)
app_list_view->SetAppListOverlayVisible(true);
}
void AppListControllerDelegateAsh::OnCloseChildDialog() {
- app_list::AppListView* app_list_view =
- ash::Shell::GetInstance()->GetAppListView();
+ app_list::AppListView* app_list_view = app_list_shower_->GetView();
if (app_list_view)
app_list_view->SetAppListOverlayVisible(false);
}
« no previous file with comments | « chrome/browser/ui/ash/app_list/app_list_controller_ash.h ('k') | chrome/browser/ui/ash/app_list/app_list_service_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698