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

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

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 added a test Created 3 years, 11 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/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index a047acbd51c35cdec04f00955df331f2eda11563..80eb285f3a4ef077d6830b63ce4eb83408bbabf6 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -637,16 +637,23 @@ void Label::ShowContextMenuForView(View* source,
source_type));
}
-bool Label::GetDecoratedWordAtPoint(const gfx::Point& point,
- gfx::DecoratedText* decorated_word,
- gfx::Point* baseline_point) {
+bool Label::GetDecoratedWordAndBaselineAtPoint(
+ const gfx::Point& point,
+ gfx::DecoratedText* decorated_word,
+ gfx::Point* baseline_point) {
gfx::RenderText* render_text = GetRenderTextForSelectionController();
return render_text
- ? render_text->GetDecoratedWordAtPoint(point, decorated_word,
- baseline_point)
+ ? render_text->GetDecoratedWordAndBaselineAtPoint(
+ point, decorated_word, baseline_point)
: false;
}
+bool Label::GetDecoratedTextAndBaselineFromSelection(
+ gfx::DecoratedText* decorated_text,
+ gfx::Point* baseline_point) {
+ return false;
msw 2017/01/26 20:59:16 Should this be implemented in this CL, or should y
spqchan 2017/02/01 00:32:38 Implemented
+}
+
gfx::RenderText* Label::GetRenderTextForSelectionController() {
return const_cast<gfx::RenderText*>(
static_cast<const Label*>(this)->GetRenderTextForSelectionController());

Powered by Google App Engine
This is Rietveld 408576698