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_AVATAR_MENU_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 Browser* browser); | 94 Browser* browser); |
95 | 95 |
96 // Sets the colors on all the |item_views_|. Called after the | 96 // Sets the colors on all the |item_views_|. Called after the |
97 // BubbleDelegateView is created and has loaded the colors from the | 97 // BubbleDelegateView is created and has loaded the colors from the |
98 // NativeTheme. | 98 // NativeTheme. |
99 void SetBackgroundColors(); | 99 void SetBackgroundColors(); |
100 | 100 |
101 // Create the menu contents for a normal profile. | 101 // Create the menu contents for a normal profile. |
102 void InitMenuContents(AvatarMenu* avatar_menu); | 102 void InitMenuContents(AvatarMenu* avatar_menu); |
103 | 103 |
104 // Create the managed user specific contents of the menu. | 104 // Create the supervised user specific contents of the menu. |
105 void InitManagedUserContents(AvatarMenu* avatar_menu); | 105 void InitSupervisedUserContents(AvatarMenu* avatar_menu); |
106 | 106 |
107 scoped_ptr<AvatarMenu> avatar_menu_; | 107 scoped_ptr<AvatarMenu> avatar_menu_; |
108 gfx::Rect anchor_rect_; | 108 gfx::Rect anchor_rect_; |
109 Browser* browser_; | 109 Browser* browser_; |
110 std::vector<ProfileItemView*> item_views_; | 110 std::vector<ProfileItemView*> item_views_; |
111 | 111 |
112 // Used to separate the link entry in the avatar menu from the other entries. | 112 // Used to separate the link entry in the avatar menu from the other entries. |
113 views::Separator* separator_; | 113 views::Separator* separator_; |
114 | 114 |
115 // This will be non-NULL if and only if | 115 // This will be non-NULL if and only if |
116 // avatar_menu_->ShouldShowAddNewProfileLink() returns true. See | 116 // avatar_menu_->ShouldShowAddNewProfileLink() returns true. See |
117 // OnAvatarMenuChanged(). | 117 // OnAvatarMenuChanged(). |
118 views::View* buttons_view_; | 118 views::View* buttons_view_; |
119 | 119 |
120 // This will be non-NULL if and only if |expanded_| is false and | 120 // This will be non-NULL if and only if |expanded_| is false and |
121 // avatar_menu_->GetManagedUserInformation() returns a non-empty string. | 121 // avatar_menu_->GetSupervisedUserInformation() returns a non-empty string. |
122 // See OnAvatarMenuChanged(). | 122 // See OnAvatarMenuChanged(). |
123 views::Label* managed_user_info_; | 123 views::Label* supervised_user_info_; |
124 views::ImageView* icon_view_; | 124 views::ImageView* icon_view_; |
125 views::Separator* separator_switch_users_; | 125 views::Separator* separator_switch_users_; |
126 views::Link* switch_profile_link_; | 126 views::Link* switch_profile_link_; |
127 | 127 |
128 static AvatarMenuBubbleView* avatar_bubble_; | 128 static AvatarMenuBubbleView* avatar_bubble_; |
129 static bool close_on_deactivate_for_testing_; | 129 static bool close_on_deactivate_for_testing_; |
130 | 130 |
131 // Is set to true if the managed user has clicked on Switch Users. | 131 // Is set to true if the supervised user has clicked on Switch Users. |
132 bool expanded_; | 132 bool expanded_; |
133 | 133 |
134 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); | 134 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); |
135 }; | 135 }; |
136 | 136 |
137 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUBBLE_VIEW_H_ | 137 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUBBLE_VIEW_H_ |
OLD | NEW |