OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_UTIL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_UTIL_H_ |
| 7 |
| 8 #include "chrome/browser/chromeos/language_preferences.h" |
| 9 |
| 10 namespace { |
| 11 |
| 12 // Returns an i18n-content value corresponding to |preference|. |
| 13 template <typename T> |
| 14 std::wstring GetI18nContentValue(const T& preference) { |
| 15 return ASCIIToWide(preference.ibus_config_name) + L"Content"; |
| 16 } |
| 17 |
| 18 // Returns a property name of templateData corresponding to |preference|. |
| 19 template <typename T> |
| 20 std::wstring GetTemplateDataPropertyName(const T& preference) { |
| 21 return ASCIIToWide(preference.ibus_config_name) + L"Value"; |
| 22 } |
| 23 |
| 24 // Returns an property name of templateData corresponding the value of the min |
| 25 // attribute. |
| 26 template <typename T> |
| 27 std::wstring GetTemplateDataMinName(const T& preference) { |
| 28 return ASCIIToWide(preference.ibus_config_name) + L"Min"; |
| 29 } |
| 30 |
| 31 // Returns an property name of templateData corresponding the value of the max |
| 32 // attribute. |
| 33 template <typename T> |
| 34 std::wstring GetTemplateDataMaxName(const T& preference) { |
| 35 return ASCIIToWide(preference.ibus_config_name) + L"Max"; |
| 36 } |
| 37 |
| 38 } // namespace |
| 39 |
| 40 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_UTIL_H_ |
OLD | NEW |