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

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: Addressed tapted's comments and made things work 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..64a2546cee5b31eb0272d0b616be7981a3e13815 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -28,6 +28,7 @@
#include "ui/gfx/text_constants.h"
#include "ui/views/context_menu_controller.h"
#include "ui/views/controls/textfield/textfield_model.h"
+#include "ui/views/controls/views_text_services_context_menu.h"
tapted 2016/12/13 05:11:24 nit: forward declare?
spqchan 2016/12/15 23:29:01 Done.
#include "ui/views/drag_controller.h"
#include "ui/views/selection_controller.h"
#include "ui/views/selection_controller_delegate.h"
@@ -270,6 +271,8 @@ class VIEWS_EXPORT Textfield : public View,
bool GetDecoratedWordAtPoint(const gfx::Point& point,
gfx::DecoratedText* decorated_word,
gfx::Point* baseline_point) override;
+ bool GetDecoratedTextFromSelection(gfx::DecoratedText* decorated_text,
+ gfx::Point* baseline_point) override;
// SelectionControllerDelegate overrides:
bool HasTextBeingDragged() const override;
@@ -525,6 +528,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