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

Unified Diff: chrome/browser/chromeos/dom_ui/language_options_util.h

Issue 3015028: Add Simplified Chinese (Pinyin) input method DOMUI configuration. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 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: chrome/browser/chromeos/dom_ui/language_options_util.h
diff --git a/chrome/browser/chromeos/dom_ui/language_options_util.h b/chrome/browser/chromeos/dom_ui/language_options_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..94b924e85b6a897e9733ccd66ab69ffc8a3bd39a
--- /dev/null
+++ b/chrome/browser/chromeos/dom_ui/language_options_util.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_UTIL_H_
+#define CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_UTIL_H_
+
+#include "chrome/browser/chromeos/language_preferences.h"
+
+namespace {
+
+// Returns an i18n-content value corresponding to |preference|.
+template <typename T>
+std::wstring GetI18nContentValue(const T& preference) {
+ return ASCIIToWide(preference.ibus_config_name) + L"Content";
+}
+
+// Returns a property name of templateData corresponding to |preference|.
+template <typename T>
+std::wstring GetTemplateDataPropertyName(const T& preference) {
+ return ASCIIToWide(preference.ibus_config_name) + L"Value";
+}
+
+// Returns an property name of templateData corresponding the value of the min
+// attribute.
+template <typename T>
+std::wstring GetTemplateDataMinName(const T& preference) {
+ return ASCIIToWide(preference.ibus_config_name) + L"Min";
+}
+
+// Returns an property name of templateData corresponding the value of the max
+// attribute.
+template <typename T>
+std::wstring GetTemplateDataMaxName(const T& preference) {
+ return ASCIIToWide(preference.ibus_config_name) + L"Max";
+}
+
+} // namespace
+
+#endif // CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698