Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: chromeos/ime/input_method_manager.h

Issue 139803010: Support comma separated hardware keyboard layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: /EnableInputMethods/ReplaceEnabeldInputMethods/ Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/ime/input_method_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ 5 #ifndef CHROMEOS_IME_INPUT_METHOD_MANAGER_H_
6 #define CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ 6 #define CHROMEOS_IME_INPUT_METHOD_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // If the given input method id is invalid, returns NULL. 109 // If the given input method id is invalid, returns NULL.
110 virtual const InputMethodDescriptor* GetInputMethodFromId( 110 virtual const InputMethodDescriptor* GetInputMethodFromId(
111 const std::string& input_method_id) const = 0; 111 const std::string& input_method_id) const = 0;
112 112
113 // Changes the current input method to |input_method_id|. If |input_method_id| 113 // Changes the current input method to |input_method_id|. If |input_method_id|
114 // is not active, switch to the first one in the active input method list. 114 // is not active, switch to the first one in the active input method list.
115 virtual void ChangeInputMethod(const std::string& input_method_id) = 0; 115 virtual void ChangeInputMethod(const std::string& input_method_id) = 0;
116 116
117 // Enables "login" keyboard layouts (e.g. US Qwerty, US Dvorak, French 117 // Enables "login" keyboard layouts (e.g. US Qwerty, US Dvorak, French
118 // Azerty) that are necessary for the |language_code| and then switches to 118 // Azerty) that are necessary for the |language_code| and then switches to
119 // |initial_layout| if the string is not empty. For example, if 119 // |initial_layouts| if the given list is not empty. For example, if
120 // |language_code| is "en-US", US Qwerty, US International, US Extended, US 120 // |language_code| is "en-US", US Qwerty, US International, US Extended, US
121 // Dvorak, and US Colemak layouts would be enabled. Likewise, for Germany 121 // Dvorak, and US Colemak layouts would be enabled. Likewise, for Germany
122 // locale, US Qwerty which corresponds to the hardware keyboard layout and 122 // locale, US Qwerty which corresponds to the hardware keyboard layout and
123 // several keyboard layouts for Germany would be enabled. 123 // several keyboard layouts for Germany would be enabled.
124 // Only layouts suitable for login screen are enabled. 124 // Only layouts suitable for login screen are enabled.
125 virtual void EnableLoginLayouts(const std::string& language_code, 125 virtual void EnableLoginLayouts(
126 const std::string& initial_layout) = 0; 126 const std::string& language_code,
127 const std::vector<std::string>& initial_layouts) = 0;
127 128
128 // Activates the input method property specified by the |key|. 129 // Activates the input method property specified by the |key|.
129 virtual void ActivateInputMethodProperty(const std::string& key) = 0; 130 virtual void ActivateInputMethodProperty(const std::string& key) = 0;
130 131
131 // Updates the list of active input method IDs, and then starts or stops the 132 // Updates the list of active input method IDs, and then starts or stops the
132 // system input method framework as needed. 133 // system input method framework as needed.
133 virtual bool EnableInputMethods( 134 virtual bool ReplaceEnabledInputMethods(
134 const std::vector<std::string>& new_active_input_method_ids) = 0; 135 const std::vector<std::string>& new_active_input_method_ids) = 0;
135 136
136 // Adds one entry to the list of active input method IDs, and then starts or 137 // Adds one entry to the list of active input method IDs, and then starts or
137 // stops the system input method framework as needed. 138 // stops the system input method framework as needed.
138 virtual bool EnableInputMethod( 139 virtual bool EnableInputMethod(
139 const std::string& new_active_input_method_id) = 0; 140 const std::string& new_active_input_method_id) = 0;
140 141
141 // Adds an input method extension. This function does not takes ownership of 142 // Adds an input method extension. This function does not takes ownership of
142 // |instance|. 143 // |instance|.
143 virtual void AddInputMethodExtension( 144 virtual void AddInputMethodExtension(
144 const std::string& imm_id, 145 const std::string& imm_id,
145 InputMethodEngineInterface* instance) = 0; 146 InputMethodEngineInterface* instance) = 0;
146 147
147 // Removes an input method extension. 148 // Removes an input method extension.
148 virtual void RemoveInputMethodExtension(const std::string& id) = 0; 149 virtual void RemoveInputMethodExtension(const std::string& id) = 0;
149 150
150 // Returns a list of descriptors for all Input Method Extensions. 151 // Returns a list of descriptors for all Input Method Extensions.
151 virtual void GetInputMethodExtensions(InputMethodDescriptors* result) = 0; 152 virtual void GetInputMethodExtensions(InputMethodDescriptors* result) = 0;
152 153
153 // Sets the list of extension IME ids which should be enabled. 154 // Sets the list of extension IME ids which should be enabled.
154 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) = 0; 155 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) = 0;
155 156
156 // Sets current input method to default (first owners, then hardware). 157 // Sets current input method to login default (first owners, then hardware).
157 virtual void SetInputMethodDefault() = 0; 158 virtual void SetInputMethodLoginDefault() = 0;
158 159
159 // Gets the descriptor of the input method which is currently selected. 160 // Gets the descriptor of the input method which is currently selected.
160 virtual InputMethodDescriptor GetCurrentInputMethod() const = 0; 161 virtual InputMethodDescriptor GetCurrentInputMethod() const = 0;
161 162
162 // Gets the list of input method properties. The list could be empty(). 163 // Gets the list of input method properties. The list could be empty().
163 virtual InputMethodPropertyList GetCurrentInputMethodProperties() const = 0; 164 virtual InputMethodPropertyList GetCurrentInputMethodProperties() const = 0;
164 165
165 // Sets the list of input method properties. The list could be empty(). 166 // Sets the list of input method properties. The list could be empty().
166 virtual void SetCurrentInputMethodProperties( 167 virtual void SetCurrentInputMethodProperties(
167 const InputMethodPropertyList& property_list) = 0; 168 const InputMethodPropertyList& property_list) = 0;
(...skipping 20 matching lines...) Expand all
188 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) = 0; 189 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) = 0;
189 190
190 // If keyboard layout can be uset at login screen 191 // If keyboard layout can be uset at login screen
191 virtual bool IsLoginKeyboard(const std::string& layout) const = 0; 192 virtual bool IsLoginKeyboard(const std::string& layout) const = 0;
192 }; 193 };
193 194
194 } // namespace input_method 195 } // namespace input_method
195 } // namespace chromeos 196 } // namespace chromeos
196 197
197 #endif // CHROMEOS_IME_INPUT_METHOD_MANAGER_H_ 198 #endif // CHROMEOS_IME_INPUT_METHOD_MANAGER_H_
OLDNEW
« no previous file with comments | « chromeos/ime/input_method_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698