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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 3 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 | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | ui/app_list/cocoa/app_list_view_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index df4870af9cc019dca7799156f54fb334a2d3a0e2..98547892021b1f89214d7eb88c9e4ddd926b8135 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -12,9 +12,8 @@
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profiles_state.h"
-#include "chrome/browser/ui/app_list/app_list_service.h"
#include "chrome/browser/ui/app_list/app_list_view_delegate.h"
-#include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h"
+#include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
#include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
@@ -102,15 +101,10 @@ content::BrowserContext* ChromeShellDelegate::GetActiveBrowserContext() {
return ProfileManager::GetActiveUserProfile();
}
-app_list::AppListViewDelegate*
-ChromeShellDelegate::CreateAppListViewDelegate() {
+app_list::AppListViewDelegate* ChromeShellDelegate::GetAppListViewDelegate() {
DCHECK(ash::Shell::HasInstance());
- // Shell will own the created delegate, and the delegate will own
- // the controller.
- return new AppListViewDelegate(
- Profile::FromBrowserContext(GetActiveBrowserContext()),
- AppListService::Get(chrome::HOST_DESKTOP_TYPE_ASH)->
- GetControllerDelegate());
+ return AppListServiceAsh::GetInstance()->GetViewDelegate(
+ Profile::FromBrowserContext(GetActiveBrowserContext()));
}
ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate(
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | ui/app_list/cocoa/app_list_view_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698