#ifndef CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_
#define CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_
#include "chrome/browser/profiles/profile_info_cache_observer.h"
#include "ui/views/controls/button/menu_button.h"
class Browser;
class NewAvatarButton : public views::MenuButton,
public ProfileInfoCacheObserver {
public:
enum AvatarButtonStyle {
THEMED_BUTTON,
NATIVE_BUTTON,
};
NewAvatarButton(views::ButtonListener* listener,
const base::string16& profile_name,
AvatarButtonStyle button_style,
Browser* browser);
virtual ~NewAvatarButton();
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
private:
friend class NewAvatarMenuButtonTest;
FRIEND_TEST_ALL_PREFIXES(NewAvatarMenuButtonTest, SignOut);
virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE;
virtual void OnProfileWasRemoved(
const base::FilePath& profile_path,
const base::string16& profile_name) OVERRIDE;
virtual void OnProfileNameChanged(
const base::FilePath& profile_path,
const base::string16& old_profile_name) OVERRIDE;
void UpdateAvatarButtonAndRelayoutParent();
Browser* browser_;
DISALLOW_COPY_AND_ASSIGN(NewAvatarButton);
};
#endif