| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_NEW_AVATAR_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_NEW_AVATAR_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_NEW_AVATAR_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_NEW_AVATAR_BUTTON_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 8 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
| 9 #include "ui/views/controls/button/menu_button.h" | 9 #include "ui/views/controls/button/menu_button.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 const base::string16& profile_name, | 24 const base::string16& profile_name, |
| 25 AvatarButtonStyle button_style, | 25 AvatarButtonStyle button_style, |
| 26 Browser* browser); | 26 Browser* browser); |
| 27 virtual ~NewAvatarButton(); | 27 virtual ~NewAvatarButton(); |
| 28 | 28 |
| 29 // views::View: | 29 // views::View: |
| 30 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 30 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 friend class NewAvatarMenuButtonTest; | 33 friend class NewAvatarMenuButtonTest; |
| 34 friend class ProfileChooserViewBrowserTest; |
| 34 FRIEND_TEST_ALL_PREFIXES(NewAvatarMenuButtonTest, SignOut); | 35 FRIEND_TEST_ALL_PREFIXES(NewAvatarMenuButtonTest, SignOut); |
| 36 FRIEND_TEST_ALL_PREFIXES(ProfileChooserViewBrowserTest, ViewProfileUMA); |
| 35 | 37 |
| 36 // ProfileInfoCacheObserver: | 38 // ProfileInfoCacheObserver: |
| 37 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE; | 39 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE; |
| 38 virtual void OnProfileWasRemoved( | 40 virtual void OnProfileWasRemoved( |
| 39 const base::FilePath& profile_path, | 41 const base::FilePath& profile_path, |
| 40 const base::string16& profile_name) OVERRIDE; | 42 const base::string16& profile_name) OVERRIDE; |
| 41 virtual void OnProfileNameChanged( | 43 virtual void OnProfileNameChanged( |
| 42 const base::FilePath& profile_path, | 44 const base::FilePath& profile_path, |
| 43 const base::string16& old_profile_name) OVERRIDE; | 45 const base::string16& old_profile_name) OVERRIDE; |
| 44 | 46 |
| 45 // Called when the profile info cache has changed, which means we might | 47 // Called when the profile info cache has changed, which means we might |
| 46 // have to re-display the profile name. | 48 // have to re-display the profile name. |
| 47 void UpdateAvatarButtonAndRelayoutParent(); | 49 void UpdateAvatarButtonAndRelayoutParent(); |
| 48 | 50 |
| 49 Browser* browser_; | 51 Browser* browser_; |
| 50 | 52 |
| 51 DISALLOW_COPY_AND_ASSIGN(NewAvatarButton); | 53 DISALLOW_COPY_AND_ASSIGN(NewAvatarButton); |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_NEW_AVATAR_BUTTON_H_ | 56 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_NEW_AVATAR_BUTTON_H_ |
| OLD | NEW |