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_CONTROLLER_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ | |
noms (inactive)
2015/03/26 15:26:56
nit: I think Mac UI files are "controllers" but no
yao
2015/03/26 18:45:01
Changed to avatar_base_button.
noms (inactive)
2015/03/30 14:54:54
Will you do the other renames in a separate CL?
yao
2015/03/30 15:02:16
This file has been reverted/deleted.
I though I
noms (inactive)
2015/03/30 15:04:00
I had suggested renaming new_avatar_button to avat
yao
2015/03/30 23:12:12
Ic, I misunderstood your initial comments, but now
noms (inactive)
2015/03/31 20:47:06
Sounds good!
| |
7 | |
8 #include "chrome/browser/profiles/profile_info_cache_observer.h" | |
9 | |
10 class Browser; | |
11 | |
12 // This view controller manages the button that sits in the top of the window | |
noms (inactive)
2015/03/26 15:26:56
nit: . at the end of the comment
noms (inactive)
2015/03/26 15:26:56
nit: This view (no controller)
yao
2015/03/26 18:45:01
Done.
yao
2015/03/26 18:45:01
Done.
| |
13 // frame and displays the active profile's info when using multi-profiles | |
14 class AvatarBaseController : public ProfileInfoCacheObserver { | |
15 public: | |
16 explicit AvatarBaseController(Browser* browser); | |
17 ~AvatarBaseController() override; | |
18 | |
19 protected: | |
20 Browser* browser() const {return browser_;} | |
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(); | |
36 | |
37 Browser* browser_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(AvatarBaseController); | |
40 }; | |
41 | |
42 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_BASE_CONTROLLER_H_ | |
OLD | NEW |