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

Unified Diff: ui/views/controls/textfield/textfield.h

Issue 302453002: New animation for the origin chip URL showing/hiding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test failure by checking for NULL extension Created 6 years, 7 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/views/controls/textfield/textfield.h
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index 8c81c6fcfd17bf987d9f60b402e0363cd798f153..f01a5e489282a81f93fc3550cb077b833626c417 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -95,18 +95,31 @@ class VIEWS_EXPORT Textfield : public View,
// Checks if there is any selected text.
bool HasSelection() const;
- // Gets/Sets the text color to be used when painting the Textfield.
- // Call |UseDefaultTextColor| to restore the default system color.
+ // Gets/sets the text color to be used when painting the Textfield.
+ // Call UseDefaultTextColor() to restore the default system color.
SkColor GetTextColor() const;
void SetTextColor(SkColor color);
void UseDefaultTextColor();
- // Gets/Sets the background color to be used when painting the Textfield.
- // Call |UseDefaultBackgroundColor| to restore the default system color.
+ // Gets/sets the background color to be used when painting the Textfield.
+ // Call UseDefaultBackgroundColor() to restore the default system color.
SkColor GetBackgroundColor() const;
void SetBackgroundColor(SkColor color);
void UseDefaultBackgroundColor();
+ // Gets/sets the selection text color to be used when painting the Textfield.
+ // Call UseDefaultSelectionTextColor() to restore the default system color.
+ SkColor GetSelectionTextColor() const;
+ void SetSelectionTextColor(SkColor color);
+ void UseDefaultSelectionTextColor();
+
+ // Gets/sets the selection background color to be used when painting the
+ // Textfield. Call UseDefaultSelectionBackgroundColor() to restore the default
+ // system color.
+ SkColor GetSelectionBackgroundColor() const;
+ void SetSelectionBackgroundColor(SkColor color);
+ void UseDefaultSelectionBackgroundColor();
+
// Gets/Sets whether or not the cursor is enabled.
bool GetCursorEnabled() const;
void SetCursorEnabled(bool enabled);
@@ -375,12 +388,16 @@ class VIEWS_EXPORT Textfield : public View,
scoped_ptr<Painter> focus_painter_;
- // Flags indicating whether text and background system colors should be used,
- // and the actual color values used if the corresponding flags are set false.
- SkColor text_color_;
+ // Flags indicating whether various system colors should be used, and if not,
+ // what overriding color values should be used instead.
bool use_default_text_color_;
- SkColor background_color_;
bool use_default_background_color_;
+ bool use_default_selection_text_color_;
+ bool use_default_selection_background_color_;
+ SkColor text_color_;
+ SkColor background_color_;
+ SkColor selection_text_color_;
+ SkColor selection_background_color_;
// Text to display when empty.
base::string16 placeholder_text_;

Powered by Google App Engine
This is Rietveld 408576698