| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // Don't populate the app list users if we are on the ash desktop. | 133 // Don't populate the app list users if we are on the ash desktop. |
| 134 chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow( | 134 chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow( |
| 135 controller_->GetAppListWindow()); | 135 controller_->GetAppListWindow()); |
| 136 if (desktop == chrome::HOST_DESKTOP_TYPE_ASH) | 136 if (desktop == chrome::HOST_DESKTOP_TYPE_ASH) |
| 137 return; | 137 return; |
| 138 | 138 |
| 139 // Populate the app list users. | 139 // Populate the app list users. |
| 140 PopulateUsers(g_browser_process->profile_manager()->GetProfileInfoCache(), | 140 PopulateUsers(g_browser_process->profile_manager()->GetProfileInfoCache(), |
| 141 profile_->GetPath(), &users_); | 141 profile_->GetPath(), &users_); |
| 142 NotifyUsersChanged(); |
| 142 } | 143 } |
| 143 | 144 |
| 144 bool AppListViewDelegate::ForceNativeDesktop() const { | 145 bool AppListViewDelegate::ForceNativeDesktop() const { |
| 145 return controller_->ForceNativeDesktop(); | 146 return controller_->ForceNativeDesktop(); |
| 146 } | 147 } |
| 147 | 148 |
| 148 void AppListViewDelegate::SetProfileByPath(const base::FilePath& profile_path) { | 149 void AppListViewDelegate::SetProfileByPath(const base::FilePath& profile_path) { |
| 149 DCHECK(model_); | 150 DCHECK(model_); |
| 150 | 151 |
| 151 // The profile must be loaded before this is called. | 152 // The profile must be loaded before this is called. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 } | 307 } |
| 307 | 308 |
| 308 content::WebContents* AppListViewDelegate::GetStartPageContents() { | 309 content::WebContents* AppListViewDelegate::GetStartPageContents() { |
| 309 app_list::StartPageService* service = | 310 app_list::StartPageService* service = |
| 310 app_list::StartPageService::Get(profile_); | 311 app_list::StartPageService::Get(profile_); |
| 311 if (!service) | 312 if (!service) |
| 312 return NULL; | 313 return NULL; |
| 313 | 314 |
| 314 return service->contents(); | 315 return service->contents(); |
| 315 } | 316 } |
| 316 | |
| 317 const app_list::AppListViewDelegate::Users& | |
| 318 AppListViewDelegate::GetUsers() const { | |
| 319 return users_; | |
| 320 } | |
| OLD | NEW |