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

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

Issue 298813002: views: Move MenuButton from TextButton to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable DragDirectlyToSecondWindow. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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 "components/signin/core/browser/signin_error_controller.h" 9 #include "components/signin/core/browser/signin_error_controller.h"
10 #include "ui/views/controls/button/menu_button.h" 10 #include "ui/views/controls/button/menu_button.h"
(...skipping 10 matching lines...) Expand all
21 THEMED_BUTTON, // Used in a themed browser window. 21 THEMED_BUTTON, // Used in a themed browser window.
22 NATIVE_BUTTON, // Used in a native aero or metro window. 22 NATIVE_BUTTON, // Used in a native aero or metro window.
23 }; 23 };
24 24
25 NewAvatarButton(views::ButtonListener* listener, 25 NewAvatarButton(views::ButtonListener* listener,
26 const base::string16& profile_name, 26 const base::string16& profile_name,
27 AvatarButtonStyle button_style, 27 AvatarButtonStyle button_style,
28 Browser* browser); 28 Browser* browser);
29 virtual ~NewAvatarButton(); 29 virtual ~NewAvatarButton();
30 30
31 // views::TextButton:
32 virtual void OnPaintText(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE;
33
34 private: 31 private:
35 friend class NewAvatarMenuButtonTest; 32 friend class NewAvatarMenuButtonTest;
36 friend class ProfileChooserViewBrowserTest; 33 friend class ProfileChooserViewBrowserTest;
37 FRIEND_TEST_ALL_PREFIXES(NewAvatarMenuButtonTest, SignOut); 34 FRIEND_TEST_ALL_PREFIXES(NewAvatarMenuButtonTest, SignOut);
38 FRIEND_TEST_ALL_PREFIXES(ProfileChooserViewBrowserTest, ViewProfileUMA); 35 FRIEND_TEST_ALL_PREFIXES(ProfileChooserViewBrowserTest, ViewProfileUMA);
39 36
40 // ProfileInfoCacheObserver: 37 // ProfileInfoCacheObserver:
41 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE; 38 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE;
42 virtual void OnProfileWasRemoved( 39 virtual void OnProfileWasRemoved(
43 const base::FilePath& profile_path, 40 const base::FilePath& profile_path,
44 const base::string16& profile_name) OVERRIDE; 41 const base::string16& profile_name) OVERRIDE;
45 virtual void OnProfileNameChanged( 42 virtual void OnProfileNameChanged(
46 const base::FilePath& profile_path, 43 const base::FilePath& profile_path,
47 const base::string16& old_profile_name) OVERRIDE; 44 const base::string16& old_profile_name) OVERRIDE;
48 45
49 // SigninErrorController::Observer: 46 // SigninErrorController::Observer:
50 virtual void OnErrorChanged() OVERRIDE; 47 virtual void OnErrorChanged() OVERRIDE;
51 48
52 // Called when the profile info cache has changed, which means we might 49 // Called when the profile info cache has changed, which means we might
53 // have to re-display the profile name. 50 // have to re-display the profile name.
54 void UpdateAvatarButtonAndRelayoutParent(); 51 void UpdateAvatarButtonAndRelayoutParent();
55 52
56 Browser* browser_; 53 Browser* browser_;
57 54
58 DISALLOW_COPY_AND_ASSIGN(NewAvatarButton); 55 DISALLOW_COPY_AND_ASSIGN(NewAvatarButton);
59 }; 56 };
60 57
61 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_NEW_AVATAR_BUTTON_H_ 58 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_NEW_AVATAR_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/avatar_label.cc ('k') | chrome/browser/ui/views/profiles/new_avatar_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698