Index: ui/views/controls/textfield/textfield.h |
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h |
index 22ff37b869acab431c7710407f0566326106d93e..2a3fe96478df8c8b56d33ff65c83a4fc6fa73e1b 100644 |
--- a/ui/views/controls/textfield/textfield.h |
+++ b/ui/views/controls/textfield/textfield.h |
@@ -392,6 +392,22 @@ class VIEWS_EXPORT Textfield : public View, |
// Pastes the selection clipboard for the specified mouse event. |
void PasteSelectionClipboard(const ui::MouseEvent& event); |
+ // Returns true if an insertion cursor should be visible (a vertical bar, |
+ // placed at the point new text will be inserted). |
+ bool ShouldShowCursor() const; |
+ |
+ // Returns true if an insertion cursor should be visible and blinking. |
+ bool ShouldBlinkCursor() const; |
+ |
+ // Starts and stops blinking the cursor, respectively. These are both |
+ // idempotent if the cursor is already blinking/not blinking. |
+ void StartBlinkingCursor(); |
+ void StopBlinkingCursor(); |
+ |
+ // Callback for the cursor blink timer. Called every |
+ // |Textfield::GetCaretBlinkMs()|. |
Peter Kasting
2016/09/20 17:15:41
Nit: No || on function names
Elly Fong-Jones
2016/09/21 14:00:10
Done.
|
+ void BlinkCursor(); |
Peter Kasting
2016/09/20 17:15:41
Nit: OnCursorBlinkTimerFired()?
Elly Fong-Jones
2016/09/21 14:00:10
Done.
|
+ |
// The text model. |
std::unique_ptr<TextfieldModel> model_; |
@@ -449,9 +465,8 @@ class VIEWS_EXPORT Textfield : public View, |
// True if InputMethod::CancelComposition() should not be called. |
bool skip_input_method_cancel_composition_; |
- // The text editing cursor repaint timer and visibility. |
- base::RepeatingTimer cursor_repaint_timer_; |
- bool cursor_visible_; |
+ // Insertion cursor repaint timer and visibility. |
+ base::RepeatingTimer cursor_blink_timer_; |
// The drop cursor is a visual cue for where dragged text will be dropped. |
bool drop_cursor_visible_; |