Index: ui/views/controls/textfield/textfield.h |
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h |
index 57509ea64781631823bf7cf243fa8d738d5f073b..33101b19c110ccb84e086e18d8f9d5cc64d05daf 100644 |
--- a/ui/views/controls/textfield/textfield.h |
+++ b/ui/views/controls/textfield/textfield.h |
@@ -16,6 +16,7 @@ |
#include "ui/base/keycodes/keyboard_codes.h" |
#include "ui/gfx/font.h" |
#include "ui/gfx/native_widget_types.h" |
+#include "ui/gfx/text_constants.h" |
#include "ui/views/controls/textfield/native_textfield_wrapper.h" |
#include "ui/views/view.h" |
@@ -23,10 +24,6 @@ |
#include "base/logging.h" |
#endif |
-namespace gfx { |
-struct StyleRange; |
-} // namespace gfx |
- |
namespace ui { |
class Range; |
class TextInputClient; |
@@ -209,14 +206,18 @@ class VIEWS_EXPORT Textfield : public View { |
// only and has to be called after the wrapper is created. |
size_t GetCursorPosition() const; |
- // Applies |style| to the text specified by its range. The style will be |
- // ignored if range is empty or invalid. This is views-implementation only and |
+ // Set the text color over the entire text or a logical character range. |
+ // Empty and invalid ranges are ignored. This is views-implementation only and |
// has to be called after the wrapper is created. |
- void ApplyStyleRange(const gfx::StyleRange& style); |
+ void SetColor(SkColor value); |
+ void ApplyColor(SkColor value, const ui::Range& range); |
- // Applies the default style to the textfield. This is views-implementation |
- // only and has to be called after the wrapper is created. |
- void ApplyDefaultStyle(); |
+ // Set various text styles over the entire text or a logical character range. |
+ // The respective |style| is applied if |value| is true, or removed if false. |
+ // Empty and invalid ranges are ignored. This is views-implementation only and |
+ // has to be called after the wrapper is created. |
+ void SetStyle(gfx::TextStyle style, bool value); |
+ void ApplyStyle(gfx::TextStyle style, bool value, const ui::Range& range); |
// Clears Edit history. |
void ClearEditHistory(); |