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

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

Issue 7265011: RenderText API Outline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO comments, revise cursor movement API, etc. Created 9 years, 5 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: views/controls/textfield/native_textfield_wrapper.h
diff --git a/views/controls/textfield/native_textfield_wrapper.h b/views/controls/textfield/native_textfield_wrapper.h
index 8d694eb48f9fc709dee689b31a7c8d8e19e32fb1..6cef09f14a99dcdf3cdd320ae66d7448cd26183f 100644
--- a/views/controls/textfield/native_textfield_wrapper.h
+++ b/views/controls/textfield/native_textfield_wrapper.h
@@ -11,6 +11,7 @@
namespace gfx {
class Insets;
+struct StyleRange;
} // namespace gfx
namespace ui {
@@ -22,7 +23,6 @@ namespace views {
class KeyEvent;
class Textfield;
class TextInputClient;
-class TextStyle;
class View;
// An interface implemented by an object that provides a platform-native
@@ -126,17 +126,12 @@ class NativeTextfieldWrapper {
// support text input.
virtual TextInputClient* GetTextInputClient() = 0;
- // Creates a new TextStyle for this textfield.
- // See |Textfield::CreateTextStyle| for detail.
- virtual TextStyle* CreateTextStyle() = 0;
+ // Applies the |style| to the text specified by its range.
+ // See |Textfield::ApplyStyleRange| for detail.
+ virtual void ApplyStyleRange(const gfx::StyleRange& style) = 0;
- // Applies the |style| to the text specified by the |range|.
- // See |Textfield::ApplyTextStyle| for detail.
- virtual void ApplyTextStyle(const TextStyle* style,
- const ui::Range& range) = 0;
-
- // Clears all text styles in this textfield.
- virtual void ClearAllTextStyles() = 0;
+ // Applies the default style to the textfield.
+ virtual void ApplyDefaultStyle() = 0;
// Clears Edit history.
virtual void ClearEditHistory() = 0;

Powered by Google App Engine
This is Rietveld 408576698