OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLER_H
_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLER_H
_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLER_H
_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLER_H
_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/ui/webui/options/language_options_handler.h" | 9 #include "chrome/browser/ui/webui/options/language_options_handler.h" |
10 #include "chromeos/ime/component_extension_ime_manager.h" | 10 #include "chromeos/ime/component_extension_ime_manager.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // in the list. | 64 // in the list. |
65 // An entry with "code" attribute set to kVendorOtherLanguagesListDivider is | 65 // An entry with "code" attribute set to kVendorOtherLanguagesListDivider is |
66 // used as a divider to separate "most relevant" languages against other. | 66 // used as a divider to separate "most relevant" languages against other. |
67 static base::ListValue* GetUILanguageList( | 67 static base::ListValue* GetUILanguageList( |
68 const input_method::InputMethodDescriptors& descriptors); | 68 const input_method::InputMethodDescriptors& descriptors); |
69 | 69 |
70 // Converts input method descriptors to the list of input methods. | 70 // Converts input method descriptors to the list of input methods. |
71 // The return value will look like: | 71 // The return value will look like: |
72 // [{'id': '_ext_ime_nejguenhnsnjnwychcnsdsdjketest', | 72 // [{'id': '_ext_ime_nejguenhnsnjnwychcnsdsdjketest', |
73 // 'displayName': 'Sample IME'}, ...] | 73 // 'displayName': 'Sample IME'}, ...] |
74 static base::ListValue* ConvertInputMethodDescriptosToIMEList( | 74 static base::ListValue* ConvertInputMethodDescriptorsToIMEList( |
75 const input_method::InputMethodDescriptors& descriptors); | 75 const input_method::InputMethodDescriptors& descriptors); |
76 | 76 |
77 private: | 77 private: |
78 // LanguageOptionsHandlerCommon implementation. | 78 // LanguageOptionsHandlerCommon implementation. |
79 virtual base::string16 GetProductName() OVERRIDE; | 79 virtual base::string16 GetProductName() OVERRIDE; |
80 virtual void SetApplicationLocale(const std::string& language_code) OVERRIDE; | 80 virtual void SetApplicationLocale(const std::string& language_code) OVERRIDE; |
81 | 81 |
82 // Called when the sign-out button is clicked. | 82 // Called when the sign-out button is clicked. |
83 void RestartCallback(const base::ListValue* args); | 83 void RestartCallback(const base::ListValue* args); |
84 | 84 |
(...skipping 18 matching lines...) Expand all Loading... |
103 // kVendorOtherLanguagesListDivider between "most relevant" languages and | 103 // kVendorOtherLanguagesListDivider between "most relevant" languages and |
104 // other. | 104 // other. |
105 static base::ListValue* GetLanguageListInternal( | 105 static base::ListValue* GetLanguageListInternal( |
106 const input_method::InputMethodDescriptors& descriptors, | 106 const input_method::InputMethodDescriptors& descriptors, |
107 const std::vector<std::string>& base_language_codes, | 107 const std::vector<std::string>& base_language_codes, |
108 bool insert_divider); | 108 bool insert_divider); |
109 | 109 |
110 // OptionsPageUIHandler implementation. | 110 // OptionsPageUIHandler implementation. |
111 virtual void InitializePage() OVERRIDE; | 111 virtual void InitializePage() OVERRIDE; |
112 | 112 |
| 113 // Adds the name of the extension that provides the IME to each entry in the |
| 114 // |list| of extension IMEs. |
| 115 void AddImeProvider(base::ListValue* list); |
| 116 |
113 // True if the component extension list was appended into input method list. | 117 // True if the component extension list was appended into input method list. |
114 bool composition_extension_appended_; | 118 bool composition_extension_appended_; |
115 | 119 |
116 // True if this page was initialized. | 120 // True if this page was initialized. |
117 bool is_page_initialized_; | 121 bool is_page_initialized_; |
118 | 122 |
119 DISALLOW_COPY_AND_ASSIGN(CrosLanguageOptionsHandler); | 123 DISALLOW_COPY_AND_ASSIGN(CrosLanguageOptionsHandler); |
120 }; | 124 }; |
121 | 125 |
122 } // namespace options | 126 } // namespace options |
123 } // namespace chromeos | 127 } // namespace chromeos |
124 | 128 |
125 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLE
R_H_ | 129 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLE
R_H_ |
OLD | NEW |