| 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..d5fed89a83a14295e23d10f71ef6a9d0a60abab6 100644
|
| --- a/chrome/browser/profiles/avatar_menu_model.h
|
| +++ b/chrome/browser/profiles/avatar_menu_model.h
|
| @@ -15,47 +15,23 @@
|
| #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"
|
| +#include "ui/base/models/avatar_menu_item_model.h"
|
|
|
| class AvatarMenuModelObserver;
|
| class Browser;
|
| class Profile;
|
| class ProfileInfoInterface;
|
|
|
| +namespace gfx {
|
| +class Image;
|
| +}
|
| +
|
| // This class is the model for the menu-like interface that appears when the
|
| // avatar icon is clicked in the browser window frame. This class will notify
|
| // its observer when the backend data changes, and the controller/view for this
|
| // 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 +63,7 @@ class AvatarMenuModel : public content::NotificationObserver {
|
| size_t GetActiveProfileIndex();
|
|
|
| // Gets the an Item at a specified index.
|
| - const Item& GetItemAt(size_t index);
|
| + const ui::AvatarMenuItemModel& GetItemAt(size_t index);
|
|
|
| // Returns true if the add profile link should be shown.
|
| bool ShouldShowAddNewProfileLink() const;
|
| @@ -141,7 +117,7 @@ class AvatarMenuModel : public content::NotificationObserver {
|
| Browser* browser_;
|
|
|
| // List of built "menu items."
|
| - std::vector<Item*> items_;
|
| + std::vector<ui::AvatarMenuItemModel*> items_;
|
|
|
| // Listens for notifications from the ProfileInfoCache.
|
| content::NotificationRegistrar registrar_;
|
|
|