OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_SUPERVISED_USER_AVATAR_LABEL_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_SUPERVISED_USER_AVATAR_LABEL_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "base/macros.h" | |
10 #include "chrome/browser/supervised_user/supervised_users.h" | |
11 #include "ui/views/controls/button/label_button.h" | |
12 | |
13 class BrowserView; | |
14 | |
15 // SupervisedUserAvatarLabel | |
16 // | |
17 // A label used to display a string indicating that the current profile belongs | |
18 // to a supervised user. | |
19 class SupervisedUserAvatarLabel : public views::LabelButton { | |
20 public: | |
21 explicit SupervisedUserAvatarLabel(BrowserView* browser_view); | |
22 ~SupervisedUserAvatarLabel() override; | |
23 | |
24 // views::LabelButton: | |
25 bool OnMousePressed(const ui::MouseEvent& event) override; | |
26 | |
27 // Update the style of the label according to the provided theme. | |
28 void UpdateLabelStyle(); | |
29 | |
30 // Sets whether the label should be displayed on the right or on the left. A | |
31 // new button border is created which has the right insets for the positioning | |
32 // of the button. | |
33 void SetLabelOnRight(bool label_on_right); | |
34 | |
35 private: | |
36 BrowserView* browser_view_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(SupervisedUserAvatarLabel); | |
39 }; | |
40 | |
41 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_SUPERVISED_USER_AVATAR_LABEL_H_ | |
OLD | NEW |