Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: chrome/browser/chromeos/login/username_view.h

Issue 5552003: Login pod visual enhancements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos/login
Patch Set: nits Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/user_view.cc ('k') | chrome/browser/chromeos/login/username_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3ea81aac6aebea5be968147454bcc434e049f5ef 100644
--- a/chrome/browser/chromeos/login/username_view.h
+++ b/chrome/browser/chromeos/login/username_view.h
@@ -20,22 +20,31 @@ 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. If
+ // |user_small_shape| is true, then one pixel margins are used. This is done
+ // to match the shape of the scaled frame of the user image. The caller gets
+ // the ownership.
+ 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_;
« no previous file with comments | « chrome/browser/chromeos/login/user_view.cc ('k') | chrome/browser/chromeos/login/username_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698