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

Unified Diff: ui/gfx/text_elider.h

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DEPS file 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/text_elider.h
diff --git a/ui/gfx/text_elider.h b/ui/gfx/text_elider.h
index 008a1cd1b5b1c60c9b7e5de0c62042d5f07fb8dd..02bdbb33a98f483ff896ec59354a14eb58f17c58 100644
--- a/ui/gfx/text_elider.h
+++ b/ui/gfx/text_elider.h
@@ -26,8 +26,8 @@ namespace gfx {
class Font;
class FontList;
-UI_EXPORT extern const char kEllipsis[];
-UI_EXPORT extern const char16 kEllipsisUTF16[];
+GFX_EXPORT extern const char kEllipsis[];
+GFX_EXPORT extern const char16 kEllipsisUTF16[];
// Elides a well-formed email address (e.g. username@domain.com) to fit into
// |available_pixel_width| using the specified |font_list|.
@@ -39,11 +39,11 @@ UI_EXPORT extern const char16 kEllipsisUTF16[];
// equally with the elided username (should the username be short enough that it
// doesn't need half the available width: the elided domain will occupy that
// extra width).
-UI_EXPORT string16 ElideEmail(const string16& email,
+GFX_EXPORT string16 ElideEmail(const string16& email,
const gfx::FontList& font_list,
sky 2013/09/24 19:11:40 nit: moar indenting
int available_pixel_width);
// Obsolete version. Use the above version which takes gfx::FontList.
-UI_EXPORT string16 ElideEmail(const string16& email,
+GFX_EXPORT string16 ElideEmail(const string16& email,
const gfx::Font& font,
int available_pixel_width);
@@ -61,12 +61,12 @@ UI_EXPORT string16 ElideEmail(const string16& email,
// as an LTR string (using base::i18n::WrapStringWithLTRFormatting()) so that it
// is displayed properly in an RTL context. Please refer to
// http://crbug.com/6487 for more information.
-UI_EXPORT string16 ElideUrl(const GURL& url,
+GFX_EXPORT string16 ElideUrl(const GURL& url,
const gfx::FontList& font_list,
int available_pixel_width,
const std::string& languages);
// Obsolete version. Use the above version which takes gfx::FontList.
-UI_EXPORT string16 ElideUrl(const GURL& url,
+GFX_EXPORT string16 ElideUrl(const GURL& url,
const gfx::Font& font,
int available_pixel_width,
const std::string& languages);
@@ -82,12 +82,12 @@ enum ElideBehavior {
// Elides |text| to fit in |available_pixel_width| according to the specified
// |elide_behavior|.
-UI_EXPORT string16 ElideText(const string16& text,
+GFX_EXPORT string16 ElideText(const string16& text,
const gfx::FontList& font_list,
int available_pixel_width,
ElideBehavior elide_behavior);
// Obsolete version. Use the above version which takes gfx::FontList.
-UI_EXPORT string16 ElideText(const string16& text,
+GFX_EXPORT string16 ElideText(const string16& text,
const gfx::Font& font,
int available_pixel_width,
ElideBehavior elide_behavior);
@@ -98,11 +98,11 @@ UI_EXPORT string16 ElideText(const string16& text,
// filename is forced to have LTR directionality, which means that in RTL UI
// the elided filename is wrapped with LRE (Left-To-Right Embedding) mark and
// PDF (Pop Directional Formatting) mark.
-UI_EXPORT string16 ElideFilename(const base::FilePath& filename,
+GFX_EXPORT string16 ElideFilename(const base::FilePath& filename,
const gfx::FontList& font_list,
int available_pixel_width);
// Obsolete version. Use the above version which takes gfx::FontList.
-UI_EXPORT string16 ElideFilename(const base::FilePath& filename,
+GFX_EXPORT string16 ElideFilename(const base::FilePath& filename,
const gfx::Font& font,
int available_pixel_width);
@@ -111,7 +111,7 @@ UI_EXPORT string16 ElideFilename(const base::FilePath& filename,
// SortedDisplayURLs for use in visually ordering the SortedDisplayURLs.
//
// SortedDisplayURL is relatively cheap and supports value semantics.
-class UI_EXPORT SortedDisplayURL {
+class GFX_EXPORT SortedDisplayURL {
public:
SortedDisplayURL(const GURL& url, const std::string& languages);
SortedDisplayURL();
@@ -154,7 +154,7 @@ class UI_EXPORT SortedDisplayURL {
// puts "Hell...Tom" in str and returns true.
// TODO(tsepez): Doesn't handle UTF-16 surrogate pairs properly.
// TODO(tsepez): Doesn't handle bidi properly.
-UI_EXPORT bool ElideString(const string16& input, int max_len,
+GFX_EXPORT bool ElideString(const string16& input, int max_len,
string16* output);
// Reformat |input| into |output| so that it fits into a |max_rows| by
@@ -166,7 +166,7 @@ UI_EXPORT bool ElideString(const string16& input, int max_len,
// intra-word (respecting UTF-16 surrogate pairs) as necssary. Truncation
// (indicated by an added 3 dots) occurs if the result is still too long.
// Returns true if the input had to be truncated (and not just reformatted).
-UI_EXPORT bool ElideRectangleString(const string16& input, size_t max_rows,
+GFX_EXPORT bool ElideRectangleString(const string16& input, size_t max_rows,
size_t max_cols, bool strict,
string16* output);
@@ -206,14 +206,14 @@ enum ReformattingResultFlags {
// param. Returns a combination of |ReformattingResultFlags| that indicate
// whether the given rectangle had insufficient space to accommodate |texŧ|,
// leading to elision or truncation (and not just reformatting).
-UI_EXPORT int ElideRectangleText(const string16& text,
+GFX_EXPORT int ElideRectangleText(const string16& text,
const gfx::FontList& font_list,
int available_pixel_width,
int available_pixel_height,
WordWrapBehavior wrap_behavior,
std::vector<string16>* lines);
// Obsolete version. Use the above version which takes gfx::FontList.
-UI_EXPORT int ElideRectangleText(const string16& text,
+GFX_EXPORT int ElideRectangleText(const string16& text,
const gfx::Font& font,
int available_pixel_width,
int available_pixel_height,
@@ -225,7 +225,7 @@ UI_EXPORT int ElideRectangleText(const string16& text,
// character (unicode character 0x2026) to render ...
// The supplied string is returned if the string has length characters or
// less.
-UI_EXPORT string16 TruncateString(const string16& string, size_t length);
+GFX_EXPORT string16 TruncateString(const string16& string, size_t length);
} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698