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

Unified Diff: ui/app_list/app_list_model.cc

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 4 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: ui/app_list/app_list_model.cc
diff --git a/ui/app_list/app_list_model.cc b/ui/app_list/app_list_model.cc
index 31e4c27402060b4824554283cd9c02b8c3e5c2b7..deb539269325a37c6bb463436fa381f38d10b1a1 100644
--- a/ui/app_list/app_list_model.cc
+++ b/ui/app_list/app_list_model.cc
@@ -8,6 +8,7 @@
#include "ui/app_list/app_list_model_observer.h"
#include "ui/app_list/search_box_model.h"
#include "ui/app_list/search_result.h"
+#include "ui/base/profile_selector/avatar_menu_item_model.h"
namespace app_list {
@@ -20,6 +21,7 @@ AppListModel::AppListModel()
}
AppListModel::~AppListModel() {
+ STLDeleteElements(&profile_menu_items_);
}
void AppListModel::AddObserver(AppListModelObserver* observer) {
@@ -49,6 +51,15 @@ void AppListModel::SetCurrentUser(const base::string16& current_user_name,
OnAppListModelCurrentUserChanged());
}
+void AppListModel::SetProfileMenuItems(
+ const ProfileMenuItems& profile_menu_items) {
+ STLDeleteElements(&profile_menu_items_);
+ profile_menu_items_ = profile_menu_items;
+ FOR_EACH_OBSERVER(AppListModelObserver,
+ observers_,
+ OnAppListModelProfileMenuItemsChanged());
+}
+
void AppListModel::SetSignedIn(bool signed_in) {
signed_in_ = signed_in;
FOR_EACH_OBSERVER(AppListModelObserver,

Powered by Google App Engine
This is Rietveld 408576698