| Index: chrome/browser/chromeos/login/username_view.h
|
| diff --git a/chrome/browser/chromeos/login/username_view.h b/chrome/browser/chromeos/login/username_view.h
|
| index f1ad180cb407764660c0f1a62fab1ccbe5fc7494..7d114daf537e3d4aecfd4b416cbb7911943aca13 100644
|
| --- a/chrome/browser/chromeos/login/username_view.h
|
| +++ b/chrome/browser/chromeos/login/username_view.h
|
| @@ -20,12 +20,19 @@ namespace chromeos {
|
| // Label with customized paddings and long text fade out.
|
| class UsernameView : public views::Label {
|
| public:
|
| - UsernameView(const std::wstring& username);
|
| + // Constructs username view for the given |username|. Consider using
|
| + // |CreateShapedUsernameView| to match the login page style.
|
| + explicit UsernameView(const std::wstring& username);
|
| +
|
| virtual ~UsernameView() {}
|
|
|
| // Overriden from views::Label.
|
| virtual void Paint(gfx::Canvas* canvas);
|
|
|
| + // Returns the shaped username view to be used on the login screen. The caller
|
| + // gets the ownership.
|
| + static UsernameView* CreateShapedUsernameView(const std::wstring& username);
|
| +
|
| private:
|
| // Paints username to the bitmap with the bounds given.
|
| void PaintUsername(const gfx::Rect& bounds);
|
| @@ -33,9 +40,6 @@ class UsernameView : public views::Label {
|
| // Holds painted username.
|
| scoped_ptr<SkBitmap> text_image_;
|
|
|
| - // Holds width of the text drawn.
|
| - int text_width_;
|
| -
|
| // Holds margins width (depends on the height).
|
| int margin_width_;
|
|
|
|
|