| Index: chrome/browser/ui/views/app_list/app_list_controller_win.cc
|
| diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
|
| index 6bbb59584622aa70edee1cbf4d2cc11df805a221..1fa329a02b8d043d8c6c311551720acef19f73e0 100644
|
| --- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
|
| +++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
|
| @@ -268,6 +268,7 @@ class AppListControllerDelegateWin : public AppListControllerDelegate {
|
| virtual void LaunchApp(Profile* profile,
|
| const extensions::Extension* extension,
|
| int event_flags) OVERRIDE;
|
| + virtual void ShowForProfileAtIndex(size_t index) OVERRIDE;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AppListControllerDelegateWin);
|
| };
|
| @@ -308,6 +309,7 @@ class AppListController : public AppListServiceImpl {
|
| virtual void HandleFirstRun() OVERRIDE;
|
| virtual void Init(Profile* initial_profile) OVERRIDE;
|
| virtual void ShowForProfile(Profile* requested_profile) OVERRIDE;
|
| + virtual void ShowForProfileAtIndex(size_t index) OVERRIDE;
|
| virtual void DismissAppList() OVERRIDE;
|
| virtual bool IsAppListVisible() const OVERRIDE;
|
| virtual gfx::NativeWindow GetAppListWindow() OVERRIDE;
|
| @@ -425,6 +427,10 @@ bool AppListControllerDelegateWin::CanPin() {
|
| return false;
|
| }
|
|
|
| +void AppListControllerDelegateWin::ShowForProfileAtIndex(size_t index) {
|
| + AppListController::GetInstance()->ShowForProfileAtIndex(index);
|
| +}
|
| +
|
| void AppListControllerDelegateWin::OnShowExtensionPrompt() {
|
| AppListController::GetInstance()->set_can_close(false);
|
| }
|
| @@ -980,6 +986,20 @@ void AppListController::LoadProfileForWarmup() {
|
| weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| +void AppListController::ShowForProfileAtIndex(size_t index) {
|
| + ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| + ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
|
| + if (index >= cache.GetNumberOfProfiles()) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| + base::FilePath profile_path = cache.GetPathOfProfileAtIndex(index);
|
| + profile_loader().LoadProfileInvalidatingOtherLoads(
|
| + profile_path,
|
| + base::Bind(&AppListController::ShowForProfile,
|
| + weak_factory_.GetWeakPtr()));
|
| +}
|
| +
|
| } // namespace
|
|
|
| namespace chrome {
|
|
|