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

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

Issue 14264004: Re-land: NativeTextfieldViews: Show the drop cursor when dragging text (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 4 Created 7 years, 8 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/native_textfield_views.h
diff --git a/ui/views/controls/textfield/native_textfield_views.h b/ui/views/controls/textfield/native_textfield_views.h
index f6bcfaa3e7b88b7a8b80e1649f00cd4be31db935..a693e6c0660e6656e78c0d5565acefd70b7d8071 100644
--- a/ui/views/controls/textfield/native_textfield_views.h
+++ b/ui/views/controls/textfield/native_textfield_views.h
@@ -69,6 +69,7 @@ class VIEWS_EXPORT NativeTextfieldViews : public View,
std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE;
virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE;
virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
+ virtual void OnDragExited() OVERRIDE;
virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
virtual void OnDragDone() OVERRIDE;
virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE;
@@ -293,8 +294,11 @@ class VIEWS_EXPORT NativeTextfieldViews : public View,
// The textfield's text and drop cursor visibility.
bool is_cursor_visible_;
+
// The drop cursor is a visual cue for where dragged text will be dropped.
bool is_drop_cursor_visible_;
+ // Position of the drop cursor, if it is visible.
+ gfx::SelectionModel drop_cursor_position_;
// True if InputMethod::CancelComposition() should not be called.
bool skip_input_method_cancel_composition_;

Powered by Google App Engine
This is Rietveld 408576698