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

Unified Diff: ui/views/view.h

Issue 2348143003: MacViews: Implement Force Touch/Mac dictionary lookup for Textfields. (Closed)
Patch Set: --- 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/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index 55cc02bb54da4eaa205df9f8adc17d5f84245279..a166aa088ab8ae7417904fe55cb9f3e841cb3b55 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -573,6 +573,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// NULL.
virtual View* GetTooltipHandlerForPoint(const gfx::Point& point);
+ // Retreives the |word| displayed at the given |point|. If no word is
+ // displayed at the |point|, returns a nearby word. |baseline_point| should
+ // correspond to the left baseline point of the leftmost glyph of the |word|
+ // in the view's coordinates. Returns false, if no word can be retreived.
+ virtual bool GetWordAtPoint(const gfx::Point& point,
tapted 2016/09/21 04:44:14 ooh - also I don't think we can justify adding thi
karandeepb 2016/09/21 05:37:12 Yeah it seems similar to tooltips but is very Mac
tapted 2016/09/22 00:50:03 What about putting a GetRenderText() directly on v
karandeepb 2016/09/22 08:17:39 We also need a method which returns non const Rend
+ gfx::NativeStyledString word,
+ gfx::Point* baseline_point);
+
// Return the cursor that should be used for this view or the default cursor.
// The event location is in the receiver's coordinate system. The caller is
// responsible for managing the lifetime of the returned object, though that

Powered by Google App Engine
This is Rietveld 408576698