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

Side by Side Diff: base/i18n/rtl.h

Issue 4139010: The UI language rather than the locale is now used to pick Chrome's language ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « base/base.gypi ('k') | base/i18n/rtl.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 BASE_I18N_RTL_H_ 5 #ifndef BASE_I18N_RTL_H_
6 #define BASE_I18N_RTL_H_ 6 #define BASE_I18N_RTL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
10
9 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
10 #include "base/string16.h" 12 #include "base/string16.h"
11 #include "build/build_config.h" 13 #include "build/build_config.h"
12 14
13 class FilePath; 15 class FilePath;
14 16
15 namespace base { 17 namespace base {
16 namespace i18n { 18 namespace i18n {
17 19
18 const char16 kRightToLeftMark = 0x200F; 20 const char16 kRightToLeftMark = 0x200F;
19 const char16 kLeftToRightMark = 0x200E; 21 const char16 kLeftToRightMark = 0x200E;
20 const char16 kLeftToRightEmbeddingMark = 0x202A; 22 const char16 kLeftToRightEmbeddingMark = 0x202A;
21 const char16 kRightToLeftEmbeddingMark = 0x202B; 23 const char16 kRightToLeftEmbeddingMark = 0x202B;
22 const char16 kPopDirectionalFormatting = 0x202C; 24 const char16 kPopDirectionalFormatting = 0x202C;
23 const char16 kLeftToRightOverride = 0x202D; 25 const char16 kLeftToRightOverride = 0x202D;
24 const char16 kRightToLeftOverride = 0x202E; 26 const char16 kRightToLeftOverride = 0x202E;
25 27
26 enum TextDirection { 28 enum TextDirection {
27 UNKNOWN_DIRECTION, 29 UNKNOWN_DIRECTION,
28 RIGHT_TO_LEFT, 30 RIGHT_TO_LEFT,
29 LEFT_TO_RIGHT, 31 LEFT_TO_RIGHT,
30 }; 32 };
31 33
32 #if defined(OS_WIN)
33 // Get language and region from the OS. Used by Chrome Frame.
34 void GetLanguageAndRegionFromOS(std::string* lang, std::string* region);
35 #endif
36
37 // Get the locale that the currently running process has been configured to use. 34 // Get the locale that the currently running process has been configured to use.
38 // The return value is of the form language[-country] (e.g., en-US) where the 35 // The return value is of the form language[-country] (e.g., en-US) where the
39 // language is the 2 or 3 letter code from ISO-639. 36 // language is the 2 or 3 letter code from ISO-639.
40 std::string GetConfiguredLocale(); 37 std::string GetConfiguredLocale();
41 38
42 // Canonicalize a string (eg. a POSIX locale string) to a Chrome locale name. 39 // Canonicalize a string (eg. a POSIX locale string) to a Chrome locale name.
43 std::string GetCanonicalLocale(const char* locale); 40 std::string GetCanonicalLocale(const char* locale);
44 41
45 // Sets the default locale of ICU. 42 // Sets the default locale of ICU.
46 // Once the application locale of Chrome in GetApplicationLocale is determined, 43 // Once the application locale of Chrome in GetApplicationLocale is determined,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // return the text itself. Explicit bidi control characters display and have 151 // return the text itself. Explicit bidi control characters display and have
155 // semantic effect. They can be deleted so they might not always appear in a 152 // semantic effect. They can be deleted so they might not always appear in a
156 // pair. 153 // pair.
157 const string16 StripWrappingBidiControlCharacters(const string16& text) 154 const string16 StripWrappingBidiControlCharacters(const string16& text)
158 WARN_UNUSED_RESULT; 155 WARN_UNUSED_RESULT;
159 156
160 } // namespace i18n 157 } // namespace i18n
161 } // namespace base 158 } // namespace base
162 159
163 #endif // BASE_I18N_RTL_H_ 160 #endif // BASE_I18N_RTL_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/i18n/rtl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698