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

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

Issue 2541313002: RenderTextHarfBuzz: Add support for multi line text selection. (Closed)
Patch Set: Nits. 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/label.h
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
index fbf67e796294c8e95a6197d065895f611c6cc91b..6293cff501081dba7bd287548fcdd42d8bf16161 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -147,6 +147,13 @@ class VIEWS_EXPORT Label : public View,
// Get the text as displayed to the user, respecting the obscured flag.
base::string16 GetDisplayTextForTesting();
+ // Returns true if the label can be made selectable. For example, links do not
+ // support text selection.
+ // Subclasses should override this function in case they want to selectively
+ // support text selection. If a subclass stops supporting text selection, it
+ // should call SetSelectable(false).
+ virtual bool IsSelectionSupported() const;
+
// Returns true if the label is selectable. Default is false.
bool selectable() const { return !!selection_controller_; }
@@ -195,13 +202,6 @@ class VIEWS_EXPORT Label : public View,
SkColor disabled_color() const { return actual_disabled_color_; }
- // Returns true if the label can be made selectable. For example, links do not
- // support text selection.
- // Subclasses should override this function in case they want to selectively
- // support text selection. If a subclass stops supporting text selection, it
- // should call SetSelectable(false).
- virtual bool IsSelectionSupported() const;
-
// View:
void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
void VisibilityChanged(View* starting_from, bool is_visible) override;

Powered by Google App Engine
This is Rietveld 408576698