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

Unified Diff: ui/app_list/app_list_model.h

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small fixups 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: 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..00d3ea5dcf5fc4506e799ebe57d0a759ffcbfb82 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,18 +47,32 @@ 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);
Apps* apps() { return apps_.get(); }
SearchBoxModel* search_box() { return search_box_.get(); }
SearchResults* results() { return results_.get(); }
Status status() const { return status_; }
+ const string16& current_user_name() const { return current_user_name_; }
+ const string16& current_user_email() const { return current_user_email_; }
+
+ const ProfileMenuItems& profile_menu_items() {
+ return profile_menu_items_;
+ }
+
private:
scoped_ptr<Apps> apps_;
scoped_ptr<SearchBoxModel> search_box_;
scoped_ptr<SearchResults> results_;
+ string16 current_user_name_;
+ string16 current_user_email_;
+ ProfileMenuItems profile_menu_items_;
+
Status status_;
ObserverList<AppListModelObserver> observers_;

Powered by Google App Engine
This is Rietveld 408576698