| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 virtual void SetImePropertyActivated(const std::string& key, | 77 virtual void SetImePropertyActivated(const std::string& key, |
| 78 bool activated) = 0; | 78 bool activated) = 0; |
| 79 | 79 |
| 80 // Returns true if the input method specified by |input_method_id| is active. | 80 // Returns true if the input method specified by |input_method_id| is active. |
| 81 virtual bool InputMethodIsActivated(const std::string& input_method_id) = 0; | 81 virtual bool InputMethodIsActivated(const std::string& input_method_id) = 0; |
| 82 | 82 |
| 83 // Get a configuration of ibus-daemon or IBus engines and stores it on | 83 // Get a configuration of ibus-daemon or IBus engines and stores it on |
| 84 // |out_value|. Returns true if |out_value| is successfully updated. | 84 // |out_value|. Returns true if |out_value| is successfully updated. |
| 85 // When you would like to retrieve 'panel/custom_font', |section| should | 85 // When you would like to retrieve 'panel/custom_font', |section| should |
| 86 // be "panel", and |config_name| should be "custom_font". | 86 // be "panel", and |config_name| should be "custom_font". |
| 87 virtual bool GetImeConfig( | 87 virtual bool GetImeConfig(const std::string& section, |
| 88 const char* section, const char* config_name, | 88 const std::string& config_name, |
| 89 ImeConfigValue* out_value) = 0; | 89 ImeConfigValue* out_value) = 0; |
| 90 | 90 |
| 91 // Updates a configuration of ibus-daemon or IBus engines with |value|. | 91 // Updates a configuration of ibus-daemon or IBus engines with |value|. |
| 92 // Returns true if the configuration (and all pending configurations, if any) | 92 // Returns true if the configuration (and all pending configurations, if any) |
| 93 // are processed. If ibus-daemon is not running, this function just queues | 93 // are processed. If ibus-daemon is not running, this function just queues |
| 94 // the request and returns false. | 94 // the request and returns false. |
| 95 // You can specify |section| and |config_name| arguments in the same way | 95 // You can specify |section| and |config_name| arguments in the same way |
| 96 // as GetImeConfig() above. | 96 // as GetImeConfig() above. |
| 97 // Notice: This function might call the Observer::ActiveInputMethodsChanged() | 97 // Notice: This function might call the Observer::ActiveInputMethodsChanged() |
| 98 // callback function immediately, before returning from the SetImeConfig | 98 // callback function immediately, before returning from the SetImeConfig |
| 99 // function. See also http://crosbug.com/5217. | 99 // function. See also http://crosbug.com/5217. |
| 100 virtual bool SetImeConfig(const char* section, | 100 virtual bool SetImeConfig(const std::string& section, |
| 101 const char* config_name, | 101 const std::string& config_name, |
| 102 const ImeConfigValue& value) = 0; | 102 const ImeConfigValue& value) = 0; |
| 103 | 103 |
| 104 // Sets the IME state to enabled, and launches its processes if needed. | 104 // Sets the IME state to enabled, and launches its processes if needed. |
| 105 virtual void StartInputMethodProcesses() = 0; | 105 virtual void StartInputMethodProcesses() = 0; |
| 106 | 106 |
| 107 // Disables the IME, and kills the processes if they are running. | 107 // Disables the IME, and kills the processes if they are running. |
| 108 virtual void StopInputMethodProcesses() = 0; | 108 virtual void StopInputMethodProcesses() = 0; |
| 109 | 109 |
| 110 // Controls whether the IME process is started when preload engines are | 110 // Controls whether the IME process is started when preload engines are |
| 111 // specificed, or defered until a non-default method is activated. | 111 // specificed, or defered until a non-default method is activated. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 122 virtual const ImePropertyList& current_ime_properties() const = 0; | 122 virtual const ImePropertyList& current_ime_properties() const = 0; |
| 123 | 123 |
| 124 // Factory function, creates a new instance and returns ownership. | 124 // Factory function, creates a new instance and returns ownership. |
| 125 // For normal usage, access the singleton via CrosLibrary::Get(). | 125 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 126 static InputMethodLibrary* GetImpl(bool stub); | 126 static InputMethodLibrary* GetImpl(bool stub); |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 } // namespace chromeos | 129 } // namespace chromeos |
| 130 | 130 |
| 131 #endif // CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_ | 131 #endif // CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_ |
| OLD | NEW |