blob: accd28201ff10263f17b248dd27da1c1e3b94dc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_AVATAR_LABEL_H_
#define CHROME_BROWSER_UI_VIEWS_AVATAR_LABEL_H_
#include "base/compiler_specific.h"
#include "ui/views/controls/button/text_button.h"
class BrowserView;
namespace ui {
class MouseEvent;
class ThemeProvider;
}
// AvatarLabel
//
// A label used to display a string indicating that the current profile belongs
// to a managed user.
class AvatarLabel : public views::TextButton {
public:
explicit AvatarLabel(BrowserView* browser_view);
virtual ~AvatarLabel();
// views::TextButton:
virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
// Update the style of the label according to the provided theme.
void UpdateLabelStyle();
// Sets whether the label should be displayed on the right or on the left. A
// new button border is created which has the right insets for the positioning
// of the button.
void SetLabelOnRight(bool label_on_right);
private:
BrowserView* browser_view_;
DISALLOW_COPY_AND_ASSIGN(AvatarLabel);
};
#endif // CHROME_BROWSER_UI_VIEWS_AVATAR_LABEL_H_
|