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

Unified Diff: chrome/browser/ui/ash/app_list/app_list_controller_ash.cc

Issue 1770993002: wip: Refactoring Ash's AppListController, moving the bulk of the logic to chrome/browser/ui/ash/app… Base URL: https://chromium.googlesource.com/chromium/src.git@small_5_apps
Patch Set: Added a comment for PostTask in AppListServiceAsh. Created 4 years, 9 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..615b2164f08d9bbe6cebb2f23ba1ddfcf9824838 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
@@ -6,13 +6,16 @@
#include "ash/metrics/task_switch_metrics_recorder.h"
#include "ash/shell.h"
+#include "chrome/browser/ui/ash/app_list/app_list_shower_ash.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "extensions/common/extension.h"
#include "ui/app_list/views/app_list_view.h"
-AppListControllerDelegateAsh::AppListControllerDelegateAsh() {}
+AppListControllerDelegateAsh::AppListControllerDelegateAsh(
+ AppListShowerAsh* app_list_shower)
+ : app_list_shower_(app_list_shower) {}
AppListControllerDelegateAsh::~AppListControllerDelegateAsh() {}
@@ -22,13 +25,11 @@ void AppListControllerDelegateAsh::DismissView() {
}
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 +60,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);
}

Powered by Google App Engine
This is Rietveld 408576698