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