BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / views / profiles / supervised_user_avatar_label.h
blobc3424b1a1a38eb5be507b734295c6a0b62ddbbe6
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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_SUPERVISED_USER_AVATAR_LABEL_H_
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_SUPERVISED_USER_AVATAR_LABEL_H_
8 #include "base/compiler_specific.h"
9 #include "chrome/browser/supervised_user/supervised_users.h"
10 #include "ui/views/controls/button/label_button.h"
12 class BrowserView;
14 // SupervisedUserAvatarLabel
16 // A label used to display a string indicating that the current profile belongs
17 // to a supervised user.
18 class SupervisedUserAvatarLabel : public views::LabelButton {
19 public:
20 explicit SupervisedUserAvatarLabel(BrowserView* browser_view);
21 ~SupervisedUserAvatarLabel() override;
23 // views::LabelButton:
24 bool OnMousePressed(const ui::MouseEvent& event) override;
26 // Update the style of the label according to the provided theme.
27 void UpdateLabelStyle();
29 // Sets whether the label should be displayed on the right or on the left. A
30 // new button border is created which has the right insets for the positioning
31 // of the button.
32 void SetLabelOnRight(bool label_on_right);
34 private:
35 BrowserView* browser_view_;
37 DISALLOW_COPY_AND_ASSIGN(SupervisedUserAvatarLabel);
40 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_SUPERVISED_USER_AVATAR_LABEL_H_