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

Side by Side Diff: app/text_elider.h

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « app/resource_bundle_linux.cc ('k') | app/text_elider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef APP_GFX_TEXT_ELIDER_H_ 5 #ifndef APP_GFX_TEXT_ELIDER_H_
6 #define APP_GFX_TEXT_ELIDER_H_ 6 #define APP_GFX_TEXT_ELIDER_H_
7 7
8 #include <unicode/coll.h> 8 #include <unicode/coll.h>
9 #include <unicode/uchar.h> 9 #include <unicode/uchar.h>
10 10
(...skipping 10 matching lines...) Expand all
21 // This function takes a GURL object and elides it. It returns a string 21 // This function takes a GURL object and elides it. It returns a string
22 // which composed of parts from subdomain, domain, path, filename and query. 22 // which composed of parts from subdomain, domain, path, filename and query.
23 // A "..." is added automatically at the end if the elided string is bigger 23 // A "..." is added automatically at the end if the elided string is bigger
24 // than the available pixel width. For available pixel width = 0, empty 24 // than the available pixel width. For available pixel width = 0, empty
25 // string is returned. |languages| is a comma separted list of ISO 639 25 // string is returned. |languages| is a comma separted list of ISO 639
26 // language codes and is used to determine what characters are understood 26 // language codes and is used to determine what characters are understood
27 // by a user. It should come from |prefs::kAcceptLanguages|. 27 // by a user. It should come from |prefs::kAcceptLanguages|.
28 // 28 //
29 // Note: in RTL locales, if the URL returned by this function is going to be 29 // Note: in RTL locales, if the URL returned by this function is going to be
30 // displayed in the UI, then it is likely that the string needs to be marked 30 // displayed in the UI, then it is likely that the string needs to be marked
31 // as an LTR string (using l10n_util::WrapStringWithLTRFormatting()) so that it 31 // as an LTR string (using base::i18n::WrapStringWithLTRFormatting()) so that it
32 // is displayed properly in an RTL context. Please refer to 32 // is displayed properly in an RTL context. Please refer to
33 // http://crbug.com/6487 for more information. 33 // http://crbug.com/6487 for more information.
34 std::wstring ElideUrl(const GURL& url, 34 std::wstring ElideUrl(const GURL& url,
35 const gfx::Font& font, 35 const gfx::Font& font,
36 int available_pixel_width, 36 int available_pixel_width,
37 const std::wstring& languages); 37 const std::wstring& languages);
38 38
39 std::wstring ElideText(const std::wstring& text, 39 std::wstring ElideText(const std::wstring& text,
40 const gfx::Font& font, 40 const gfx::Font& font,
41 int available_pixel_width); 41 int available_pixel_width);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // End of the prefix (spec and separator) in display_url_. 79 // End of the prefix (spec and separator) in display_url_.
80 size_t prefix_end_; 80 size_t prefix_end_;
81 81
82 string16 display_url_; 82 string16 display_url_;
83 }; 83 };
84 84
85 } // namespace gfx. 85 } // namespace gfx.
86 86
87 #endif // APP_GFX_TEXT_ELIDER_H_ 87 #endif // APP_GFX_TEXT_ELIDER_H_
OLDNEW
« no previous file with comments | « app/resource_bundle_linux.cc ('k') | app/text_elider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698