annotate modules/web/src/main/native/Source/WebCore/platform/java/LanguageJava.cpp @ 4236:8cbaf9096cda

RT-31450: Merge with Webkit master (svn revision r150795)
author Alexey Utkin <alexey.utkin@oracle.com>
date Fri, 05 Jul 2013 14:44:35 +0400
parents bcd662ba5826
children 94331ac42150
rev   line source
peterz@3550 1 /*
peterz@3550 2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
peterz@3550 3 */
peterz@3550 4
peterz@3550 5 #include "config.h"
peterz@3550 6 #include "Language.h"
peterz@3550 7
peterz@3550 8 #include "ChromiumBridge.h"
peterz@3550 9 #include <wtf/Vector.h>
alexey@4236 10 #include <wtf/text/WTFString.h>
peterz@3550 11
peterz@3550 12 namespace WebCore {
peterz@3550 13
peterz@3550 14 static String platformLanguage()
peterz@3550 15 {
peterz@3550 16 DEFINE_STATIC_LOCAL(String, computedDefaultLanguage, ());
peterz@3550 17 if (computedDefaultLanguage.isEmpty())
peterz@3550 18 computedDefaultLanguage.append(ChromiumBridge::computedDefaultLanguage());
peterz@3550 19 return computedDefaultLanguage;
peterz@3550 20 }
peterz@3550 21
peterz@3550 22 String platformDefaultLanguage()
peterz@3550 23 {
peterz@3550 24 return platformLanguage();
peterz@3550 25 }
peterz@3550 26
peterz@3550 27 Vector<String> platformUserPreferredLanguages()
peterz@3550 28 {
peterz@3550 29 Vector<String> userPreferredLanguages;
peterz@3550 30 userPreferredLanguages.append(platformLanguage());
peterz@3550 31 return userPreferredLanguages;
peterz@3550 32 }
peterz@3550 33
peterz@3550 34 } // namespace WebCore