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

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: rebased Created 3 years, 10 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
« no previous file with comments | « ui/views/controls/label.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.h
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index 69d7b462bffc4694539a20479bb55443e58c334c..d4ed20c6642bf521498f0f386e0c3a6fd81b697a 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,
@@ -264,9 +265,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;
@@ -522,6 +526,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.
« no previous file with comments | « ui/views/controls/label.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698