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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 2348143003: MacViews: Implement Force Touch/Mac dictionary lookup for Textfields. (Closed)
Patch Set: Fix compile. Created 4 years, 3 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/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 14736697771bda755ab2e7e08f2ad70cc1fee919..fcfa2fdbb0eafae78cee4355b4dcd84091b4cc08 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -558,6 +558,10 @@ const char* Textfield::GetClassName() const {
return kViewClassName;
}
+gfx::RenderText* Textfield::GetRenderText() const {
+ return model_->render_text();
+}
+
gfx::NativeCursor Textfield::GetCursor(const ui::MouseEvent& event) {
bool in_selection = GetRenderText()->IsPointInSelection(event.location());
bool drag_event = event.type() == ui::ET_MOUSE_DRAGGED;
@@ -1551,10 +1555,6 @@ void Textfield::DoInsertChar(base::char16 ch) {
OnAfterUserAction();
}
-gfx::RenderText* Textfield::GetRenderText() const {
- return model_->render_text();
-}
-
base::string16 Textfield::GetSelectionClipboardText() const {
base::string16 selection_clipboard_text;
ui::Clipboard::GetForCurrentThread()->ReadText(

Powered by Google App Engine
This is Rietveld 408576698