| Index: ui/gfx/text_elider.h
|
| diff --git a/ui/gfx/text_elider.h b/ui/gfx/text_elider.h
|
| index 9b89ef79a90240181a7621985d3d6f84750175c2..82da1f0789a36a8c40adb387ba861b10731f38f1 100644
|
| --- a/ui/gfx/text_elider.h
|
| +++ b/ui/gfx/text_elider.h
|
| @@ -27,6 +27,7 @@ class FontList;
|
|
|
| GFX_EXPORT extern const char kEllipsis[];
|
| GFX_EXPORT extern const base::char16 kEllipsisUTF16[];
|
| +GFX_EXPORT extern const base::char16 kForwardSlash;
|
|
|
|
|
| // Helper class to split + elide text, while respecting UTF16 surrogate pairs.
|
| @@ -74,25 +75,6 @@ GFX_EXPORT base::string16 ElideEmail(const base::string16& email,
|
| const gfx::FontList& font_list,
|
| float available_pixel_width);
|
|
|
| -// This function takes a GURL object and elides it. It returns a string
|
| -// which composed of parts from subdomain, domain, path, filename and query.
|
| -// A "..." is added automatically at the end if the elided string is bigger
|
| -// than the |available_pixel_width|. For |available_pixel_width| == 0, a
|
| -// formatted, but un-elided, string is returned. |languages| is a comma
|
| -// separated list of ISO 639 language codes and is used to determine what
|
| -// characters are understood by a user. It should come from
|
| -// |prefs::kAcceptLanguages|.
|
| -//
|
| -// Note: in RTL locales, if the URL returned by this function is going to be
|
| -// displayed in the UI, then it is likely that the string needs to be marked
|
| -// 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.
|
| -GFX_EXPORT base::string16 ElideUrl(const GURL& url,
|
| - const gfx::FontList& font_list,
|
| - float available_pixel_width,
|
| - const std::string& languages);
|
| -
|
| enum ElideBehavior {
|
| // Add ellipsis at the end of the string.
|
| ELIDE_AT_END,
|
| @@ -121,41 +103,6 @@ GFX_EXPORT base::string16 ElideFilename(const base::FilePath& filename,
|
| const gfx::FontList& font_list,
|
| float available_pixel_width);
|
|
|
| -// SortedDisplayURL maintains a string from a URL suitable for display to the
|
| -// use. SortedDisplayURL also provides a function used for comparing two
|
| -// SortedDisplayURLs for use in visually ordering the SortedDisplayURLs.
|
| -//
|
| -// SortedDisplayURL is relatively cheap and supports value semantics.
|
| -class GFX_EXPORT SortedDisplayURL {
|
| - public:
|
| - SortedDisplayURL(const GURL& url, const std::string& languages);
|
| - SortedDisplayURL();
|
| - ~SortedDisplayURL();
|
| -
|
| - // Compares this SortedDisplayURL to |url| using |collator|. Returns a value
|
| - // < 0, = 1 or > 0 as to whether this url is less then, equal to or greater
|
| - // than the supplied url.
|
| - int Compare(const SortedDisplayURL& other, icu::Collator* collator) const;
|
| -
|
| - // Returns the display string for the URL.
|
| - const base::string16& display_url() const { return display_url_; }
|
| -
|
| - private:
|
| - // Returns everything after the host. This is used by Compare if the hosts
|
| - // match.
|
| - base::string16 AfterHost() const;
|
| -
|
| - // Host name minus 'www.'. Used by Compare.
|
| - base::string16 sort_host_;
|
| -
|
| - // End of the prefix (spec and separator) in display_url_.
|
| - size_t prefix_end_;
|
| -
|
| - base::string16 display_url_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(SortedDisplayURL);
|
| -};
|
| -
|
| // Functions to elide strings when the font information is unknown. As
|
| // opposed to the above functions, the ElideString() and
|
| // ElideRectangleString() functions operate in terms of character units,
|
|
|