OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2010, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2010, 2013 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef Language_h | 26 #ifndef Language_h |
27 #define Language_h | 27 #define Language_h |
28 | 28 |
29 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.h" |
30 #include "wtf/Forward.h" | 30 #include "wtf/Forward.h" |
31 #include "wtf/Vector.h" | 31 #include "wtf/Vector.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
| 35 // Returns lowercased BCP-47 language tag such as "en-us". This is the UI |
| 36 // locale of the browser application. |
35 PLATFORM_EXPORT AtomicString defaultLanguage(); | 37 PLATFORM_EXPORT AtomicString defaultLanguage(); |
| 38 // Returns a list of lowercased BCP-47 language tags. This never returns |
| 39 // multiple values in production. This is not a value of Accept-Languages |
| 40 // header. See ChromeClient::acceptLanguages. |
36 PLATFORM_EXPORT Vector<AtomicString> userPreferredLanguages(); | 41 PLATFORM_EXPORT Vector<AtomicString> userPreferredLanguages(); |
37 PLATFORM_EXPORT Vector<AtomicString> userPreferredLanguagesOverride(); | |
38 PLATFORM_EXPORT void overrideUserPreferredLanguages(const Vector<AtomicString>&)
; | 42 PLATFORM_EXPORT void overrideUserPreferredLanguages(const Vector<AtomicString>&)
; |
39 PLATFORM_EXPORT size_t indexOfBestMatchingLanguageInList(const AtomicString& lan
guage, const Vector<AtomicString>& languageList); | 43 PLATFORM_EXPORT size_t indexOfBestMatchingLanguageInList(const AtomicString& lan
guage, const Vector<AtomicString>& languageList); |
40 | 44 |
41 } | 45 } |
42 | 46 |
43 #endif | 47 #endif |
OLD | NEW |