| 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 4f473efbc36a7fe0e134522219338ae7f13e0dc4..0814d912de878545e0b54b4ab8df90b7acd9c113 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 {
|
|
|
| @@ -15,10 +16,12 @@ AppListModel::AppListModel()
|
| : apps_(new Apps),
|
| search_box_(new SearchBoxModel),
|
| results_(new SearchResults),
|
| - status_(STATUS_NORMAL) {
|
| + status_(STATUS_NORMAL),
|
| + signed_in_(false) {
|
| }
|
|
|
| AppListModel::~AppListModel() {
|
| + STLDeleteElements(&profile_menu_items_);
|
| }
|
|
|
| void AppListModel::AddObserver(AppListModelObserver* observer) {
|
| @@ -39,4 +42,29 @@ void AppListModel::SetStatus(Status status) {
|
| OnAppListModelStatusChanged());
|
| }
|
|
|
| +void AppListModel::SetCurrentUser(const base::string16& current_user_name,
|
| + const base::string16& current_user_email) {
|
| + current_user_name_ = current_user_name;
|
| + current_user_email_ = current_user_email;
|
| + FOR_EACH_OBSERVER(AppListModelObserver,
|
| + observers_,
|
| + OnAppListModelProfilesChanged());
|
| +}
|
| +
|
| +void AppListModel::SetProfileMenuItems(
|
| + const ProfileMenuItems& profile_menu_items) {
|
| + STLDeleteElements(&profile_menu_items_);
|
| + profile_menu_items_ = profile_menu_items;
|
| + FOR_EACH_OBSERVER(AppListModelObserver,
|
| + observers_,
|
| + OnAppListModelProfilesChanged());
|
| +}
|
| +
|
| +void AppListModel::SetSignedIn(bool signed_in) {
|
| + signed_in_ = signed_in;
|
| + FOR_EACH_OBSERVER(AppListModelObserver,
|
| + observers_,
|
| + OnAppListModelSigninStatusChanged());
|
| +}
|
| +
|
| } // namespace app_list
|
|
|