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

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

Issue 2639493002: MacViews: Enable word lookup for selectable views::Labels and multi-line text. (Closed)
Patch Set: Address nits. 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
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.h
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
index 6293cff501081dba7bd287548fcdd42d8bf16161..227929cb2b7d389a65e1b04a19f633edcc9eb7d3 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -13,6 +13,7 @@
#include "ui/views/context_menu_controller.h"
#include "ui/views/selection_controller_delegate.h"
#include "ui/views/view.h"
+#include "ui/views/word_lookup_client.h"
namespace views {
class LabelSelectionTest;
@@ -22,6 +23,7 @@ class SelectionController;
// A view subclass that can display a string.
class VIEWS_EXPORT Label : public View,
public ContextMenuController,
+ public WordLookupClient,
public SelectionControllerDelegate,
public ui::SimpleMenuModel::Delegate {
public:
@@ -185,6 +187,7 @@ class VIEWS_EXPORT Label : public View,
const char* GetClassName() const override;
View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
bool CanProcessEventsWithinSubtree() const override;
+ WordLookupClient* GetWordLookupClient() override;
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
bool GetTooltipText(const gfx::Point& p,
base::string16* tooltip) const override;
@@ -233,6 +236,11 @@ class VIEWS_EXPORT Label : public View,
const gfx::Point& point,
ui::MenuSourceType source_type) override;
+ // WordLookupClient overrides:
+ bool GetDecoratedWordAtPoint(const gfx::Point& point,
+ gfx::DecoratedText* decorated_word,
+ gfx::Point* baseline_point) override;
+
// SelectionControllerDelegate overrides:
gfx::RenderText* GetRenderTextForSelectionController() override;
bool IsReadOnly() const override;
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698