| OLD | NEW |
| 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 // This file contains utility functions for dealing with localized | 5 // This file contains utility functions for dealing with localized |
| 6 // content. | 6 // content. |
| 7 | 7 |
| 8 #ifndef APP_L10N_UTIL_H_ | 8 #ifndef APP_L10N_UTIL_H_ |
| 9 #define APP_L10N_UTIL_H_ | 9 #define APP_L10N_UTIL_H_ |
| 10 | 10 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // strings are rendered properly in an LTR context. | 181 // strings are rendered properly in an LTR context. |
| 182 void WrapStringWithRTLFormatting(std::wstring* text); | 182 void WrapStringWithRTLFormatting(std::wstring* text); |
| 183 | 183 |
| 184 // Wraps individual file path components to get them to display correctly in an | 184 // Wraps individual file path components to get them to display correctly in an |
| 185 // RTL UI. All filepaths should be passed through this function before display | 185 // RTL UI. All filepaths should be passed through this function before display |
| 186 // in UI for RTL locales. | 186 // in UI for RTL locales. |
| 187 void WrapPathWithLTRFormatting(const FilePath& path, | 187 void WrapPathWithLTRFormatting(const FilePath& path, |
| 188 string16* rtl_safe_path); | 188 string16* rtl_safe_path); |
| 189 | 189 |
| 190 // Returns the default text alignment to be used when drawing text on a | 190 // Returns the default text alignment to be used when drawing text on a |
| 191 // ChromeCanvas based on the directionality of the system locale language. This | 191 // gfx::Canvas based on the directionality of the system locale language. This |
| 192 // function is used by ChromeCanvas::DrawStringInt when the text alignment is | 192 // function is used by gfx::Canvas::DrawStringInt when the text alignment is |
| 193 // not specified. | 193 // not specified. |
| 194 // | 194 // |
| 195 // This function returns either ChromeCanvas::TEXT_ALIGN_LEFT or | 195 // This function returns either gfx::Canvas::TEXT_ALIGN_LEFT or |
| 196 // ChromeCanvas::TEXT_ALIGN_RIGHT. | 196 // gfx::Canvas::TEXT_ALIGN_RIGHT. |
| 197 int DefaultCanvasTextAlignment(); | 197 int DefaultCanvasTextAlignment(); |
| 198 | 198 |
| 199 // Compares the two strings using the specified collator. | 199 // Compares the two strings using the specified collator. |
| 200 UCollationResult CompareStringWithCollator(const Collator* collator, | 200 UCollationResult CompareStringWithCollator(const Collator* collator, |
| 201 const std::wstring& lhs, | 201 const std::wstring& lhs, |
| 202 const std::wstring& rhs); | 202 const std::wstring& rhs); |
| 203 | 203 |
| 204 // Used by SortStringsUsingMethod. Invokes a method on the objects passed to | 204 // Used by SortStringsUsingMethod. Invokes a method on the objects passed to |
| 205 // operator (), comparing the string results using a collator. | 205 // operator (), comparing the string results using a collator. |
| 206 template <class T, class Method> | 206 template <class T, class Method> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 private: | 362 private: |
| 363 UBiDi* bidi_; | 363 UBiDi* bidi_; |
| 364 | 364 |
| 365 DISALLOW_COPY_AND_ASSIGN(BiDiLineIterator); | 365 DISALLOW_COPY_AND_ASSIGN(BiDiLineIterator); |
| 366 }; | 366 }; |
| 367 | 367 |
| 368 } | 368 } |
| 369 | 369 |
| 370 #endif // APP_L10N_UTIL_H_ | 370 #endif // APP_L10N_UTIL_H_ |
| OLD | NEW |