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

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

Issue 6982055: Draw a NativeTextfieldViews drop location cursor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Init textfield bounds to fix NativeTextfieldViewsTest.DragAndDrop_AcceptDrop. Created 9 years, 6 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_views.h
diff --git a/views/controls/textfield/native_textfield_views.h b/views/controls/textfield/native_textfield_views.h
index 54c13fb8bf26cd55e382c5846bca0da44c38f869..f26f5fde1ad3278b4203633783df3d9ca62b6cf1 100644
--- a/views/controls/textfield/native_textfield_views.h
+++ b/views/controls/textfield/native_textfield_views.h
@@ -181,6 +181,9 @@ class NativeTextfieldViews : public View,
// Repaint the cursor.
void RepaintCursor();
+ // Returns the bounds of character at the current cursor.
+ gfx::Rect GetCursorBounds(size_t cursor_pos) const;
+
// Update the cursor_bounds and text_offset.
void UpdateCursorBoundsAndTextOffset();
@@ -241,15 +244,18 @@ class NativeTextfieldViews : public View,
// The x offset for the text to be drawn, without insets;
int text_offset_;
- // Cursor's bounds in the textfield's coordinates.
- gfx::Rect cursor_bounds_;
-
// True if the textfield is in insert mode.
bool insert_;
- // The drawing state of cursor. True to draw.
+ // The local bounds and visibility of the textfield's primary text cursor.
+ gfx::Rect cursor_bounds_;
bool is_cursor_visible_;
+ // The local bounds and visibility of the textfield's drop text cursor.
+ // The drop cursor is a visual cue for where dragged text will be dropped.
+ gfx::Rect drop_cursor_bounds_;
+ bool is_drop_cursor_visible_;
+
// True if InputMethod::CancelComposition() should not be called.
bool skip_input_method_cancel_composition_;
« no previous file with comments | « no previous file | views/controls/textfield/native_textfield_views.cc » ('j') | views/controls/textfield/native_textfield_views.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698