| 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 CHROME_COMMON_L10N_UTIL_H_ | 8 #ifndef CHROME_COMMON_L10N_UTIL_H_ |
| 9 #define CHROME_COMMON_L10N_UTIL_H_ | 9 #define CHROME_COMMON_L10N_UTIL_H_ |
| 10 | 10 |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 | 12 |
| 13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
| 14 #include <windows.h> | 14 #include <windows.h> |
| 15 #endif | 15 #endif |
| 16 #include <string> | 16 #include <string> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "base/basictypes.h" | 19 #include "base/basictypes.h" |
| 20 #include "third_party/icu38/public/common/unicode/ubidi.h" | 20 #include "third_party/icu38/public/common/unicode/ubidi.h" |
| 21 | 21 |
| 22 class PrefService; | 22 class PrefService; |
| 23 | 23 |
| 24 namespace l10n_util { | 24 namespace l10n_util { |
| 25 | 25 |
| 26 const wchar_t kRightToLeftMark[] = L"\x200f"; | 26 const wchar_t kRightToLeftMark[] = L"\x200f"; |
| 27 const wchar_t kLeftToRightMark[] = L"\x200e"; |
| 27 | 28 |
| 28 // This method is responsible for determining the locale as defined below. In | 29 // This method is responsible for determining the locale as defined below. In |
| 29 // nearly all cases you shouldn't call this, rather use GetApplicationLocale | 30 // nearly all cases you shouldn't call this, rather use GetApplicationLocale |
| 30 // defined on browser_process. | 31 // defined on browser_process. |
| 31 // | 32 // |
| 32 // Returns the locale used by the Application. First we use the value from the | 33 // Returns the locale used by the Application. First we use the value from the |
| 33 // command line (--lang), second we try the value in the prefs file (passed in | 34 // command line (--lang), second we try the value in the prefs file (passed in |
| 34 // as |pref_locale|), finally, we fall back on the system locale. We only return | 35 // as |pref_locale|), finally, we fall back on the system locale. We only return |
| 35 // a value if there's a corresponding resource DLL for the locale. Otherwise, | 36 // a value if there's a corresponding resource DLL for the locale. Otherwise, |
| 36 // we fall back to en-us. | 37 // we fall back to en-us. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 203 |
| 203 private: | 204 private: |
| 204 UBiDi* bidi_; | 205 UBiDi* bidi_; |
| 205 | 206 |
| 206 DISALLOW_COPY_AND_ASSIGN(BiDiLineIterator); | 207 DISALLOW_COPY_AND_ASSIGN(BiDiLineIterator); |
| 207 }; | 208 }; |
| 208 | 209 |
| 209 } | 210 } |
| 210 | 211 |
| 211 #endif // CHROME_COMMON_L10N_UTIL_H_ | 212 #endif // CHROME_COMMON_L10N_UTIL_H_ |
| OLD | NEW |