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

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

Issue 2164483006: [MacViews] Implemented text context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for tapted 3 Created 4 years 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.h
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index bcc3bbc0d58083dbdd891e892a8bd2b9dd277d79..19189e1cb61088c614037b29cbb0dea07330fe7c 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -38,6 +38,7 @@ namespace views {
class MenuRunner;
class TextfieldController;
+class ViewsTextServicesContextMenu;
// A views/skia textfield implementation. No platform-specific code is used.
class VIEWS_EXPORT Textfield : public View,
@@ -267,9 +268,12 @@ class VIEWS_EXPORT Textfield : public View,
const gfx::Point& p) override;
// WordLookupClient overrides:
- bool GetDecoratedWordAtPoint(const gfx::Point& point,
- gfx::DecoratedText* decorated_word,
- gfx::Point* baseline_point) override;
+ bool GetDecoratedWordAndBaselineAtPoint(const gfx::Point& point,
+ gfx::DecoratedText* decorated_word,
+ gfx::Point* baseline_point) override;
+ bool GetDecoratedTextAndBaselineFromSelection(
+ gfx::DecoratedText* decorated_text,
+ gfx::Point* baseline_point) override;
// SelectionControllerDelegate overrides:
bool HasTextBeingDragged() const override;
@@ -525,6 +529,7 @@ class VIEWS_EXPORT Textfield : public View,
// Context menu related members.
std::unique_ptr<ui::SimpleMenuModel> context_menu_contents_;
+ std::unique_ptr<ViewsTextServicesContextMenu> text_services_context_menu_;
std::unique_ptr<views::MenuRunner> context_menu_runner_;
// Used to bind callback functions to this object.

Powered by Google App Engine
This is Rietveld 408576698