Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / ash / chrome_shell_delegate.cc
index 9ac7946..9854789 100644 (file)
@@ -4,8 +4,6 @@
 
 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
 
-#include "apps/app_window.h"
-#include "apps/app_window_registry.h"
 #include "ash/content_support/gpu_support_impl.h"
 #include "ash/magnifier/magnifier_constants.h"
 #include "ash/wm/window_state.h"
 #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"
 #include "chrome/browser/ui/browser_commands.h"
+#include "chrome/grit/chromium_strings.h"
 #include "components/signin/core/common/profile_management_switches.h"
-#include "grit/chromium_strings.h"
-#include "grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util.h"
 
 #if defined(OS_CHROMEOS)
@@ -105,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(