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

Unified Diff: ui/gfx/platform_font.h

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win bots Created 7 years, 3 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/gfx/platform_font.h
diff --git a/ui/gfx/platform_font.h b/ui/gfx/platform_font.h
index 7670d47602a3724114a4dc4bd3d93e282ed7f1e8..e85207548256940db57def9df4675af170387153 100644
--- a/ui/gfx/platform_font.h
+++ b/ui/gfx/platform_font.h
@@ -43,16 +43,16 @@ class GFX_EXPORT PlatformFont : public base::RefCounted<PlatformFont> {
virtual int GetBaseline() const = 0;
// Returns the average character width for the font.
- virtual int GetAverageCharacterWidth() const = 0;
+ virtual float GetAverageCharacterWidth() const = 0;
// Returns the number of horizontal pixels needed to display the specified
msw 2013/10/01 02:42:48 nit: s/number of pixels/pixel width/; ditto below.
jianli 2013/10/01 18:56:50 Done.
// string.
- virtual int GetStringWidth(const base::string16& text) const = 0;
+ virtual float GetStringWidth(const base::string16& text) const = 0;
// Returns the expected number of horizontal pixels needed to display the
// specified length of characters. Call GetStringWidth() to retrieve the
// actual number.
- virtual int GetExpectedTextWidth(int length) const = 0;
+ virtual float GetExpectedTextWidth(int length) const = 0;
// Returns the style of the font.
virtual int GetStyle() const = 0;

Powered by Google App Engine
This is Rietveld 408576698