Index: ui/app_list/app_list_model.h |
diff --git a/ui/app_list/app_list_model.h b/ui/app_list/app_list_model.h |
index 4c46a0123297d05aed9d25ece397e5506475c711..45546b668b2dc2632d2eb11b73ae7dacd47dc7df 100644 |
--- a/ui/app_list/app_list_model.h |
+++ b/ui/app_list/app_list_model.h |
@@ -5,12 +5,19 @@ |
#ifndef UI_APP_LIST_APP_LIST_MODEL_H_ |
#define UI_APP_LIST_APP_LIST_MODEL_H_ |
+#include <vector> |
+ |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/observer_list.h" |
+#include "base/strings/string16.h" |
#include "ui/app_list/app_list_export.h" |
#include "ui/base/models/list_model.h" |
+namespace ui { |
+struct AvatarMenuItemModel; |
+} |
+ |
namespace app_list { |
class AppListItemModel; |
@@ -31,6 +38,7 @@ class APP_LIST_EXPORT AppListModel { |
typedef ui::ListModel<AppListItemModel> Apps; |
typedef ui::ListModel<SearchResult> SearchResults; |
+ typedef std::vector<ui::AvatarMenuItemModel*> ProfileMenuItems; |
AppListModel(); |
~AppListModel(); |
@@ -39,11 +47,23 @@ class APP_LIST_EXPORT AppListModel { |
void RemoveObserver(AppListModelObserver* observer); |
void SetStatus(Status status); |
+ void SetCurrentUser(const base::string16& current_user_name, |
+ const base::string16& current_user_email); |
+ void SetProfileMenuItems(const ProfileMenuItems& profile_menu_items); |
+ void SetSignedIn(bool signed_in); |
Apps* apps() { return apps_.get(); } |
SearchBoxModel* search_box() { return search_box_.get(); } |
SearchResults* results() { return results_.get(); } |
Status status() const { return status_; } |
+ bool signed_in() const { return signed_in_; } |
+ |
+ const string16& current_user_name() const { return current_user_name_; } |
tapted
2013/08/05 03:01:39
nit: base:: prefix on string16
calamity
2013/08/08 04:52:12
Done.
|
+ const string16& current_user_email() const { return current_user_email_; } |
+ |
+ const ProfileMenuItems& profile_menu_items() { |
tapted
2013/08/05 03:01:39
nit: const qualifier on member function?
calamity
2013/08/08 04:52:12
Done.
|
+ return profile_menu_items_; |
+ } |
private: |
scoped_ptr<Apps> apps_; |
@@ -51,6 +71,11 @@ class APP_LIST_EXPORT AppListModel { |
scoped_ptr<SearchBoxModel> search_box_; |
scoped_ptr<SearchResults> results_; |
+ string16 current_user_name_; |
+ string16 current_user_email_; |
+ ProfileMenuItems profile_menu_items_; |
+ bool signed_in_; |
+ |
Status status_; |
ObserverList<AppListModelObserver> observers_; |