Chromium Code Reviews| 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 { | |
|
msw
2015/04/01 01:30:16
Two overarching questions here:
1) Don't we plan t
yao
2015/04/10 00:43:32
I'm not sure, I did not know much of the history o
noms (inactive)
2015/04/16 22:29:59
1) Yes we do, sort of. The button will be gone, bu
| |
| 15 public: | |
| 16 explicit AvatarBaseButton(Browser* browser); | |
| 17 ~AvatarBaseButton() override; | |
| 18 | |
| 19 protected: | |
| 20 Browser* browser() const {return browser_;} | |
|
msw
2015/04/01 01:30:16
nit: spaces inside curly braces.
yao
2015/04/10 00:43:32
Done.
| |
| 21 | |
| 22 private: | |
| 23 // ProfileInfoCacheObserver: | |
| 24 void OnProfileAdded(const base::FilePath& profile_path) override; | |
| 25 void OnProfileWasRemoved(const base::FilePath& profile_path, | |
| 26 const base::string16& profile_name) override; | |
| 27 void OnProfileNameChanged(const base::FilePath& profile_path, | |
| 28 const base::string16& old_profile_name) override; | |
| 29 void OnProfileAvatarChanged(const base::FilePath& profile_path) override; | |
| 30 void OnProfileSupervisedUserIdChanged( | |
| 31 const base::FilePath& profile_path) override; | |
| 32 | |
| 33 // Called when the profile info cache has changed, which means we might | |
| 34 // have to update the icon/text of the button. | |
| 35 virtual void Update(); | |
|
msw
2015/04/01 01:30:16
Shouldn't this be protected for subclasses overrid
yao
2015/04/10 00:43:32
Done.
| |
| 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 |