[Password manager] Temporarily add some CHECKs to investigate a crash
[chromium-blink-merge.git] / chrome / browser / ui / views / profiles / avatar_base_button.h
blobd2d8ab546ea9d261336e4544d79de2d1f875776a
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"
10 class Browser;
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 {
15 public:
16 explicit AvatarBaseButton(Browser* browser);
17 ~AvatarBaseButton() override;
19 protected:
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;
26 private:
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;
37 Browser* browser_;
39 DISALLOW_COPY_AND_ASSIGN(AvatarBaseButton);
42 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_BUTTON_H_