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

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: 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.h
diff --git a/ui/app_list/app_list_model.h b/ui/app_list/app_list_model.h
index 196adc44cf24ed19ce9fd3747b05794bec986720..c91056e4e3b6d1b49a5320a69e5cad65a2f13328 100644
--- a/ui/app_list/app_list_model.h
+++ b/ui/app_list/app_list_model.h
@@ -5,6 +5,8 @@
#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"
@@ -12,6 +14,10 @@
#include "ui/app_list/app_list_export.h"
#include "ui/base/models/list_model.h"
+namespace ui {
+struct AvatarMenuItemModel;
+}
+
namespace app_list {
class AppListItemModel;
@@ -32,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();
@@ -42,6 +49,7 @@ class APP_LIST_EXPORT AppListModel {
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(); }
@@ -49,6 +57,10 @@ class APP_LIST_EXPORT AppListModel {
SearchResults* results() { return results_.get(); }
Status status() const { return status_; }
bool signed_in() const { return signed_in_; }
+
+ const ProfileMenuItems& profile_menu_items() const {
+ return profile_menu_items_;
+ }
const base::string16& current_user_name() const { return current_user_name_; }
const base::string16& current_user_email() const {
return current_user_email_;
@@ -63,6 +75,7 @@ class APP_LIST_EXPORT AppListModel {
base::string16 current_user_name_;
base::string16 current_user_email_;
bool signed_in_;
+ ProfileMenuItems profile_menu_items_;
Status status_;
ObserverList<AppListModelObserver> observers_;

Powered by Google App Engine
This is Rietveld 408576698