1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_BUTTON_H_
8 #include "chrome/browser/profiles/profile_info_cache_observer.h"
12 // This view manages the button that sits in the top of the window frame and
13 // displays the active profile's info when using multi-profiles.
14 class AvatarBaseButton
: public ProfileInfoCacheObserver
{
16 explicit AvatarBaseButton(Browser
* browser
);
17 ~AvatarBaseButton() override
;
20 Browser
* browser() const { return browser_
; }
22 // Called when the profile info cache has changed, which means we might
23 // have to update the icon/text of the button.
24 virtual void Update() = 0;
27 // ProfileInfoCacheObserver:
28 void OnProfileAdded(const base::FilePath
& profile_path
) override
;
29 void OnProfileWasRemoved(const base::FilePath
& profile_path
,
30 const base::string16
& profile_name
) override
;
31 void OnProfileNameChanged(const base::FilePath
& profile_path
,
32 const base::string16
& old_profile_name
) override
;
33 void OnProfileAvatarChanged(const base::FilePath
& profile_path
) override
;
34 void OnProfileSupervisedUserIdChanged(
35 const base::FilePath
& profile_path
) override
;
39 DISALLOW_COPY_AND_ASSIGN(AvatarBaseButton
);
42 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_BUTTON_H_