Chromium Code Reviews| 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/chromeos/input_method/input_method_descriptor.h" | 9 #include "chrome/browser/chromeos/input_method/input_method_descriptor.h" |
| 10 #include "chrome/browser/ui/webui/options/language_options_handler.h" | 10 #include "chrome/browser/ui/webui/options/language_options_handler.h" |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 static base::ListValue* GetInputMethodList( | 39 static base::ListValue* GetInputMethodList( |
| 40 const input_method::InputMethodDescriptors& descriptors); | 40 const input_method::InputMethodDescriptors& descriptors); |
| 41 | 41 |
| 42 // Gets the list of languages from the given input descriptors. | 42 // Gets the list of languages from the given input descriptors. |
| 43 // The return value will look like: | 43 // The return value will look like: |
| 44 // [{'code': 'fi', 'displayName': 'Finnish', 'nativeDisplayName': 'suomi'}, | 44 // [{'code': 'fi', 'displayName': 'Finnish', 'nativeDisplayName': 'suomi'}, |
| 45 // ...] | 45 // ...] |
| 46 static base::ListValue* GetLanguageList( | 46 static base::ListValue* GetLanguageList( |
| 47 const input_method::InputMethodDescriptors& descriptors); | 47 const input_method::InputMethodDescriptors& descriptors); |
| 48 | 48 |
| 49 static base::ListValue* GetExtensionImeList(); | |
|
James Hawkins
2012/09/12 16:11:58
nit: Document.
Zachary Kuznia
2012/09/13 09:28:32
Done.
| |
| 50 | |
| 49 private: | 51 private: |
| 50 // LanguageOptionsHandlerCommon implementation. | 52 // LanguageOptionsHandlerCommon implementation. |
| 51 virtual string16 GetProductName() OVERRIDE; | 53 virtual string16 GetProductName() OVERRIDE; |
| 52 virtual void SetApplicationLocale(const std::string& language_code) OVERRIDE; | 54 virtual void SetApplicationLocale(const std::string& language_code) OVERRIDE; |
| 53 | 55 |
| 54 // Called when the sign-out button is clicked. | 56 // Called when the sign-out button is clicked. |
| 55 void RestartCallback(const base::ListValue* args); | 57 void RestartCallback(const base::ListValue* args); |
| 56 | 58 |
| 57 // Called when the input method is disabled. | 59 // Called when the input method is disabled. |
| 58 // |args| will contain the input method ID as string (ex. "mozc"). | 60 // |args| will contain the input method ID as string (ex. "mozc"). |
| 59 void InputMethodDisableCallback(const base::ListValue* args); | 61 void InputMethodDisableCallback(const base::ListValue* args); |
| 60 | 62 |
| 61 // Called when the input method is enabled. | 63 // Called when the input method is enabled. |
| 62 // |args| will contain the input method ID as string (ex. "mozc"). | 64 // |args| will contain the input method ID as string (ex. "mozc"). |
| 63 void InputMethodEnableCallback(const base::ListValue* args); | 65 void InputMethodEnableCallback(const base::ListValue* args); |
| 64 | 66 |
| 65 // Called when the input method options page is opened. | 67 // Called when the input method options page is opened. |
| 66 // |args| will contain the input method ID as string (ex. "mozc"). | 68 // |args| will contain the input method ID as string (ex. "mozc"). |
| 67 void InputMethodOptionsOpenCallback(const base::ListValue* args); | 69 void InputMethodOptionsOpenCallback(const base::ListValue* args); |
| 68 | 70 |
| 69 DISALLOW_COPY_AND_ASSIGN(CrosLanguageOptionsHandler); | 71 DISALLOW_COPY_AND_ASSIGN(CrosLanguageOptionsHandler); |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 } // namespace options | 74 } // namespace options |
| 73 } // namespace chromeos | 75 } // namespace chromeos |
| 74 | 76 |
| 75 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLE R_H_ | 77 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLE R_H_ |
| OLD | NEW |