| Index: chrome/browser/ui/app_list/app_list_view_delegate.cc
|
| diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
|
| index b4631aa62a20a2af0221c747d238bf6be116c1c2..0f165e79436a9f3c686fd02a12a90f58f3232c41 100644
|
| --- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
|
| +++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
|
| @@ -4,12 +4,18 @@
|
|
|
| #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
|
|
|
| +#include "chrome/browser/browser_process.h"
|
| +#include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
|
| #include "chrome/browser/ui/app_list/apps_model_builder.h"
|
| #include "chrome/browser/ui/app_list/chrome_app_list_item.h"
|
| #include "chrome/browser/ui/app_list/chrome_signin_delegate.h"
|
| #include "chrome/browser/ui/app_list/search_builder.h"
|
| +#include "chrome/browser/ui/browser_finder.h"
|
| +#include "chrome/browser/ui/chrome_pages.h"
|
| +#include "chrome/browser/ui/host_desktop.h"
|
| +#include "chrome/common/extensions/extension_constants.h"
|
| #include "content/public/browser/user_metrics.h"
|
|
|
| #if defined(USE_ASH)
|
| @@ -101,3 +107,34 @@ void AppListViewDelegate::ViewActivationChanged(bool active) {
|
| gfx::ImageSkia AppListViewDelegate::GetWindowIcon() {
|
| return controller_->GetWindowIcon();
|
| }
|
| +
|
| +string16 AppListViewDelegate::GetCurrentUserName() {
|
| + ProfileInfoCache& cache =
|
| + g_browser_process->profile_manager()->GetProfileInfoCache();
|
| + int profile_index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
|
| + return cache.GetNameOfProfileAtIndex(profile_index);
|
| +}
|
| +
|
| +string16 AppListViewDelegate::GetCurrentUserEmail() {
|
| + ProfileInfoCache& cache =
|
| + g_browser_process->profile_manager()->GetProfileInfoCache();
|
| + int profile_index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
|
| + return cache.GetUserNameOfProfileAtIndex(profile_index);
|
| +}
|
| +
|
| +void AppListViewDelegate::OpenSettings() {
|
| + ExtensionService* service = profile_->GetExtensionService();
|
| + DCHECK(service);
|
| + const extensions::Extension* extension = service->GetInstalledExtension(
|
| + extension_misc::kSettingsAppId);
|
| + DCHECK(extension);
|
| + controller_->ActivateApp(profile_, extension, 0);
|
| +}
|
| +
|
| +void AppListViewDelegate::OpenFeedback() {
|
| + chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow(
|
| + controller_->GetAppListWindow());
|
| + Browser* browser = chrome::FindOrCreateTabbedBrowser(
|
| + profile_, desktop);
|
| + chrome::ShowFeedbackPage(browser, std::string(), std::string());
|
| +}
|
|
|