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

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

Issue 1036233005: Allow views::Label subclasses create RenderText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move implementation to match Created 5 years, 9 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 | « no previous file | 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 03eade981af0e8d38aeb93c7ee45c1b0ca15bb76..bf5f096f0c90b20562cac6bf64121f382037fc63 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -135,6 +135,13 @@ class VIEWS_EXPORT Label : public View {
void OnEnabledChanged() override;
protected:
+ // Create a single RenderText instance to actually be painted.
+ virtual scoped_ptr<gfx::RenderText> CreateRenderText(
+ const base::string16& text,
+ gfx::HorizontalAlignment alignment,
+ gfx::DirectionalityMode directionality,
+ gfx::ElideBehavior elide_behavior);
+
void PaintText(gfx::Canvas* canvas);
SkColor disabled_color() const { return actual_disabled_color_; }
@@ -157,13 +164,6 @@ class VIEWS_EXPORT Label : public View {
void ResetLayout();
- // Create a single RenderText instance to actually be painted.
- scoped_ptr<gfx::RenderText> CreateRenderText(
- const base::string16& text,
- gfx::HorizontalAlignment alignment,
- gfx::DirectionalityMode directionality,
- gfx::ElideBehavior elide_behavior);
-
// Set up |lines_| to actually be painted.
void MaybeBuildRenderTextLines();
« no previous file with comments | « no previous file | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698