| 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..756b6e58cfcd294ded5d1c13fa499195d7b653fd 100644
|
| --- a/ui/app_list/app_list_model.h
|
| +++ b/ui/app_list/app_list_model.h
|
| @@ -5,7 +5,10 @@
|
| #ifndef UI_APP_LIST_APP_LIST_MODEL_H_
|
| #define UI_APP_LIST_APP_LIST_MODEL_H_
|
|
|
| +#include <vector>
|
| +
|
| #include "base/basictypes.h"
|
| +#include "base/files/file_path.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/observer_list.h"
|
| #include "base/strings/string16.h"
|
| @@ -25,6 +28,21 @@ class SearchResult;
|
| // the model for SearchBoxView. SearchResults owns a list of SearchResult.
|
| class APP_LIST_EXPORT AppListModel {
|
| public:
|
| + // A user of the app list.
|
| + struct User {
|
| + // Whether or not this user is the current user of the app list.
|
| + bool active;
|
| +
|
| + // The name of this user.
|
| + string16 name;
|
| +
|
| + // The email address of this user.
|
| + string16 email;
|
| +
|
| + // The path to this user's profile directory.
|
| + base::FilePath profile_path;
|
| + };
|
| +
|
| enum Status {
|
| STATUS_NORMAL,
|
| STATUS_SYNCING, // Syncing apps or installing synced apps.
|
| @@ -32,6 +50,7 @@ class APP_LIST_EXPORT AppListModel {
|
|
|
| typedef ui::ListModel<AppListItemModel> Apps;
|
| typedef ui::ListModel<SearchResult> SearchResults;
|
| + typedef std::vector<User> Users;
|
|
|
| AppListModel();
|
| ~AppListModel();
|
| @@ -40,8 +59,7 @@ 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 SetUsers(const Users& profile_menu_items);
|
| void SetSignedIn(bool signed_in);
|
|
|
| Apps* apps() { return apps_.get(); }
|
| @@ -49,9 +67,9 @@ class APP_LIST_EXPORT AppListModel {
|
| SearchResults* results() { return results_.get(); }
|
| Status status() const { return status_; }
|
| bool signed_in() const { return signed_in_; }
|
| - const base::string16& current_user_name() const { return current_user_name_; }
|
| - const base::string16& current_user_email() const {
|
| - return current_user_email_;
|
| +
|
| + const Users& users() const {
|
| + return users_;
|
| }
|
|
|
| private:
|
| @@ -63,6 +81,7 @@ class APP_LIST_EXPORT AppListModel {
|
| base::string16 current_user_name_;
|
| base::string16 current_user_email_;
|
| bool signed_in_;
|
| + Users users_;
|
|
|
| Status status_;
|
| ObserverList<AppListModelObserver> observers_;
|
|
|