Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ee4769fc650c333695c975dc3b291ad0fd8c40c5..e798f98a5185d2fe2fe6ba37ac0c74066e8f5441 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -54,7 +54,11 @@ void CreateShortcutInWebAppDir(
AppListViewDelegate::AppListViewDelegate(AppListControllerDelegate* controller,
Profile* profile)
: controller_(controller),
- profile_(profile) {}
+ profile_(profile),
+ avatar_menu_model_(
koz (OOO until 15th September) 2013/07/26 06:30:18 Better to pass this in.
calamity 2013/07/26 09:13:29 Done.
+ &g_browser_process->profile_manager()->GetProfileInfoCache(),
+ NULL,
+ NULL) {}
AppListViewDelegate::~AppListViewDelegate() {}
@@ -209,3 +213,15 @@ void AppListViewDelegate::OpenFeedback() {
chrome::ShowFeedbackPage(browser, std::string(),
chrome::kAppLauncherCategoryTag);
}
+
+std::vector<AvatarMenuItemModel> AppListViewDelegate::GetAvatarMenuItems() {
+ std::vector<AvatarMenuItemModel> items;
+ for (size_t i = 0; i < avatar_menu_model_.GetNumberOfItems(); ++i) {
+ items.push_back(avatar_menu_model_.GetItemAt(i));
+ }
+ return items;
+}
+
+void AppListViewDelegate::ShowForProfileAtIndex(size_t index) {
+ controller_->ShowForProfileAtIndex(index);
+}

Powered by Google App Engine
This is Rietveld 408576698