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

Unified Diff: third_party/WebKit/Source/platform/fonts/AcceptLanguagesResolver.h

Issue 1693563003: Take Accept-Language into account in CJK font fallback for Android/Win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aceept-lang
Patch Set: Fix non-Windows builds Created 4 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/AcceptLanguagesResolver.h
diff --git a/third_party/WebKit/Source/platform/fonts/AcceptLanguagesResolver.h b/third_party/WebKit/Source/platform/fonts/AcceptLanguagesResolver.h
new file mode 100644
index 0000000000000000000000000000000000000000..c643d5ed04b26e954d8203a8c3b3fd73889bae35
--- /dev/null
+++ b/third_party/WebKit/Source/platform/fonts/AcceptLanguagesResolver.h
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef AcceptLanguagesResolver_h
+#define AcceptLanguagesResolver_h
+
+#include "platform/PlatformExport.h"
+#include "wtf/text/WTFString.h"
+
+#include <unicode/uscript.h>
+
+namespace blink {
+
+class PLATFORM_EXPORT AcceptLanguagesResolver {
+public:
+ static UScriptCode preferredHanScript() { return m_preferredHanScript; }
+ static const char* preferredHanSkFontMgrLocale()
+ {
+ return m_preferredHanSkFontMgrLocale;
+ }
+
+ static void acceptLanguagesChanged(const String&);
+
+ static void updateFromAcceptLanguages(const String&);
+
+private:
+ static UScriptCode m_preferredHanScript;
+ static const char* m_preferredHanSkFontMgrLocale;
+};
+
+} // namespace blink
+
+#endif // AcceptLanguagesResolver_h

Powered by Google App Engine
This is Rietveld 408576698