OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_BUTTON_H_ |
| 7 |
| 8 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
| 9 |
| 10 class Browser; |
| 11 |
| 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; |
| 18 |
| 19 protected: |
| 20 Browser* browser() const { return browser_; } |
| 21 |
| 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; |
| 25 |
| 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; |
| 36 |
| 37 Browser* browser_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(AvatarBaseButton); |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_BUTTON_H_ |
OLD | NEW |