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 73d1abd6ab33c292b84e7888227a3149c1b142c0..271f72c97ed06c581f2a71e31b36d969717c7e33 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 |
@@ -5,7 +5,7 @@ |
#include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h" |
#include "ash/shell.h" |
-#include "chrome/browser/ui/app_list/app_list_util.h" |
+#include "chrome/browser/ui/app_list_service.h" |
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
AppListControllerDelegateAsh::AppListControllerDelegateAsh() {} |
@@ -65,43 +65,23 @@ void AppListControllerDelegateAsh::LaunchApp( |
DismissView(); |
} |
-#if !defined(OS_WIN) |
-namespace chrome { |
+void AppListServiceAsh::GetInstance() { |
+ return Singleton<AppListServiceAsh>::get(); |
+} |
-// In the win_aura build these are defined in app_list_controller_win.cc. |
-void ShowAppList(Profile* default_profile) { |
- ash::Shell::GetInstance()->ToggleAppList(NULL); |
+void AppListServiceAsh::ShowAppList(Profile* default_profile) { |
+ // This may not work correctly if the profile passed in is different from the |
+ // one the ash Shell is currently using. |
+ // TODO(ananta): Handle profile changes correctly when !defined(OS_CHROMEOS). |
+ if (!IsAppListVisible()) |
+ ash::Shell::GetInstance()->ToggleAppList(NULL); |
} |
-bool IsAppListVisible() { |
+bool AppListServiceAsh::IsAppListVisible() { |
return ash::Shell::GetInstance()->GetAppListWindow() != NULL; |
} |
-void DismissAppList() { |
+void AppListServiceAsh::DismissAppList() { |
if (IsAppListVisible()) |
ash::Shell::GetInstance()->ToggleAppList(NULL); |
} |
- |
-void SetAppListProfile(const base::FilePath& profile_file_path) { |
-} |
- |
-void NotifyAppListOfBeginExtensionInstall( |
- Profile* profile, |
- const std::string& extension_id, |
- const std::string& extension_name, |
- const gfx::ImageSkia& installing_icon) { |
-} |
- |
-void NotifyAppListOfDownloadProgress( |
- Profile* profile, |
- const std::string& extension_id, |
- int percent_downloaded) { |
-} |
- |
-void NotifyAppListOfExtensionInstallFailure( |
- Profile* profile, |
- const std::string& extension_id) { |
-} |
- |
-} // namespace chrome |
-#endif |