Chromium Code Reviews| Index: chrome/browser/profiles/avatar_menu_model.h |
| diff --git a/chrome/browser/profiles/avatar_menu_model.h b/chrome/browser/profiles/avatar_menu_model.h |
| index 95668b43c804583f3558033492fd65e9a96e8744..6c584f271246d41f97ee875c4f255aad05ac9dde 100644 |
| --- a/chrome/browser/profiles/avatar_menu_model.h |
| +++ b/chrome/browser/profiles/avatar_menu_model.h |
| @@ -15,7 +15,7 @@ |
| #include "content/public/browser/notification_registrar.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/browser/web_contents_observer.h" |
| -#include "ui/gfx/image/image.h" |
|
tapted
2013/07/29 01:59:10
nit: you probably keep a forward dec for GetManage
calamity
2013/07/30 08:42:34
Done.
|
| +#include "ui/base/models/avatar_menu_item_model.h" |
| class AvatarMenuModelObserver; |
| class Browser; |
| @@ -28,34 +28,6 @@ class ProfileInfoInterface; |
| // model should forward actions back to it in response to user events. |
| class AvatarMenuModel : public content::NotificationObserver { |
| public: |
| - // Represents an item in the menu. |
| - struct Item { |
| - Item(size_t model_index, const gfx::Image& icon); |
| - ~Item(); |
| - |
| - // The icon to be displayed next to the item. |
| - gfx::Image icon; |
| - |
| - // Whether or not the current browser is using this profile. |
| - bool active; |
| - |
| - // The name of this profile. |
| - string16 name; |
| - |
| - // A string representing the sync state of the profile. |
| - string16 sync_state; |
| - |
| - // Whether or not the current profile is signed in. If true, |sync_state| is |
| - // expected to be the email of the signed in user. |
| - bool signed_in; |
| - |
| - // Whether or not the current profile requires sign-in before use. |
| - bool signin_required; |
| - |
| - // The index in the |profile_cache| that this Item represents. |
| - size_t model_index; |
| - }; |
| - |
| // Constructor. |observer| can be NULL. |browser| can be NULL and a new one |
| // will be created if an action requires it. |
| AvatarMenuModel(ProfileInfoInterface* profile_cache, |
| @@ -87,7 +59,7 @@ class AvatarMenuModel : public content::NotificationObserver { |
| size_t GetActiveProfileIndex(); |
| // Gets the an Item at a specified index. |
| - const Item& GetItemAt(size_t index); |
| + const AvatarMenuItemModel& GetItemAt(size_t index); |
| // Returns true if the add profile link should be shown. |
| bool ShouldShowAddNewProfileLink() const; |
| @@ -141,7 +113,7 @@ class AvatarMenuModel : public content::NotificationObserver { |
| Browser* browser_; |
| // List of built "menu items." |
| - std::vector<Item*> items_; |
| + std::vector<AvatarMenuItemModel*> items_; |
| // Listens for notifications from the ProfileInfoCache. |
| content::NotificationRegistrar registrar_; |