Index: ui/gfx/render_text.h |
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
index da3607d9e11f8ed7109d2033f28903f7171b9d19..ca33c7847ec23bd342cc74d8143668e546e66d52 100644 |
--- a/ui/gfx/render_text.h |
+++ b/ui/gfx/render_text.h |
@@ -21,16 +21,6 @@ |
namespace gfx { |
-// Color settings for text, backgrounds and cursor. |
-// These are tentative, and should be derived from theme, system |
-// settings and current settings. |
-// TODO(oshima): Change this to match the standard chrome |
-// before dogfooding textfield views. |
-const SkColor kSelectedTextColor = SK_ColorWHITE; |
-const SkColor kFocusedSelectionColor = SkColorSetRGB(30, 144, 255); |
-const SkColor kUnfocusedSelectionColor = SK_ColorLTGRAY; |
-const SkColor kCursorColor = SK_ColorBLACK; |
- |
class Canvas; |
class RenderTextTest; |
@@ -73,6 +63,10 @@ class UI_EXPORT RenderText { |
const string16& text() const { return text_; } |
void SetText(const string16& text); |
+ // Like text() except that it returns asterisks or bullets if this is a |
+ // password field. |
+ string16 GetCensoredText() const; |
+ |
const SelectionModel& selection_model() const { return selection_model_; } |
bool cursor_visible() const { return cursor_visible_; } |
@@ -87,6 +81,10 @@ class UI_EXPORT RenderText { |
const StyleRange& default_style() const { return default_style_; } |
void set_default_style(StyleRange style) { default_style_ = style; } |
+ // In a password field, all text is drawn as asterisks or bullets. |
+ bool is_password() const { return password_; } |
+ void SetIsPassword(bool password); |
oshima
2011/12/02 23:15:54
I thought we wanted to change "password" to someth
benrg
2011/12/06 17:21:30
Done. I originally split off issue 8748001 because
|
+ |
const Rect& display_rect() const { return display_rect_; } |
void SetDisplayRect(const Rect& r); |
@@ -296,6 +294,9 @@ class UI_EXPORT RenderText { |
// The default text style. |
StyleRange default_style_; |
+ // True if this is a password field. |
+ bool password_; |
+ |
// The local display area for rendering the text. |
Rect display_rect_; |
// The offset for the text to be drawn, relative to the display area. |