Chromium Code Reviews| 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..d6cfce603753876ef2abf43f0ff9935e7922da9d 100644 |
| --- a/chrome/browser/chromeos/login/username_view.h |
| +++ b/chrome/browser/chromeos/login/username_view.h |
| @@ -20,22 +20,29 @@ namespace chromeos { |
| // Label with customized paddings and long text fade out. |
| class UsernameView : public views::Label { |
| public: |
| - 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. |
|
Nikita (slow)
2010/12/07 09:32:40
Comment about |use_small_shape|, when it's used.
altimofeev
2010/12/10 10:25:25
Done.
|
| + static UsernameView* CreateShapedUsernameView(const std::wstring& username, |
| + bool use_small_shape); |
| + |
| + protected: |
| + // Constructs username view for the given |username|. Consider using |
| + // |CreateShapedUsernameView| to match the login page style. |
| + explicit UsernameView(const std::wstring& username); |
| + |
| private: |
| + |
| // Paints username to the bitmap with the bounds given. |
| void PaintUsername(const gfx::Rect& bounds); |
| // 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_; |