Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: chrome/browser/ui/views/profiles/avatar_base_button.h

Issue 1009403002: Refactor the avatar button/icon class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view.cc ('k') | chrome/browser/ui/views/profiles/avatar_base_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698