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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 std::string& section, | 100 virtual bool SetImeConfig(const std::string& section, |
101 const std::string& config_name, | 101 const std::string& config_name, |
102 const ImeConfigValue& value) = 0; | 102 const ImeConfigValue& value) = 0; |
103 | 103 |
104 // Returns the keyboard overlay ID corresponding to |input_method_id|. | |
105 // Returns an empty string if there is no corresponding keyboard overlay ID. | |
106 virtual std::string GetKeyboardOverlayId( | |
107 const std::string& input_method_id) = 0; | |
108 | |
109 // 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. |
110 virtual void StartInputMethodProcesses() = 0; | 105 virtual void StartInputMethodProcesses() = 0; |
111 | 106 |
112 // Disables the IME, and kills the processes if they are running. | 107 // Disables the IME, and kills the processes if they are running. |
113 virtual void StopInputMethodProcesses() = 0; | 108 virtual void StopInputMethodProcesses() = 0; |
114 | 109 |
115 // Controls whether the IME process is started when preload engines are | 110 // Controls whether the IME process is started when preload engines are |
116 // specificed, or defered until a non-default method is activated. | 111 // specificed, or defered until a non-default method is activated. |
117 virtual void SetDeferImeStartup(bool defer) = 0; | 112 virtual void SetDeferImeStartup(bool defer) = 0; |
118 | 113 |
119 // Controls whether the IME process is stopped when all non-default preload | 114 // Controls whether the IME process is stopped when all non-default preload |
120 // engines are removed. | 115 // engines are removed. |
121 virtual void SetEnableAutoImeShutdown(bool enable) = 0; | 116 virtual void SetEnableAutoImeShutdown(bool enable) = 0; |
122 | 117 |
123 | 118 |
124 virtual const InputMethodDescriptor& previous_input_method() const = 0; | 119 virtual const InputMethodDescriptor& previous_input_method() const = 0; |
125 virtual const InputMethodDescriptor& current_input_method() const = 0; | 120 virtual const InputMethodDescriptor& current_input_method() const = 0; |
126 | 121 |
127 virtual const ImePropertyList& current_ime_properties() const = 0; | 122 virtual const ImePropertyList& current_ime_properties() const = 0; |
128 | 123 |
129 // Factory function, creates a new instance and returns ownership. | 124 // Factory function, creates a new instance and returns ownership. |
130 // For normal usage, access the singleton via CrosLibrary::Get(). | 125 // For normal usage, access the singleton via CrosLibrary::Get(). |
131 static InputMethodLibrary* GetImpl(bool stub); | 126 static InputMethodLibrary* GetImpl(bool stub); |
132 }; | 127 }; |
133 | 128 |
134 } // namespace chromeos | 129 } // namespace chromeos |
135 | 130 |
136 #endif // CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_ | 131 #endif // CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_ |
OLD | NEW |