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

Unified Diff: ui/gfx/render_text.h

Issue 8747001: Reintroduce password support to NativeTextfieldViews (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new implementation, linux only Created 8 years, 10 months 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
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index db98b846057abbc7a8a0b63e0b1f7ce81953b3a6..6d9b23093c99345916ad34c7271099697698a7ef 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -135,6 +135,10 @@ class UI_EXPORT RenderText {
// Get the first font in |font_list_|.
const Font& GetFont() const;
+ // Like text() except that it returns asterisks or bullets if this is an
+ // obscured field.
+ string16 GetDisplayText() const;
xji 2012/02/18 01:28:47 change to protected.
benrg 2012/02/24 19:07:44 Done.
+
const SelectionModel& selection_model() const { return selection_model_; }
bool cursor_enabled() const { return cursor_enabled_; }
@@ -152,6 +156,10 @@ class UI_EXPORT RenderText {
const StyleRange& default_style() const { return default_style_; }
void set_default_style(const StyleRange& style) { default_style_ = style; }
+ // In an obscured (password) field, all text is drawn as asterisks or bullets.
+ bool is_obscured() const { return obscured_; }
+ void SetObscured(bool obscured);
+
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
@@ -410,6 +418,9 @@ class UI_EXPORT RenderText {
// The default text style.
StyleRange default_style_;
+ // True if this is an obscured (password) field.
+ bool obscured_;
+
// Fade text head and/or tail, if text doesn't fit into |display_rect_|.
bool fade_head_;
bool fade_tail_;

Powered by Google App Engine
This is Rietveld 408576698