Chromium Code Reviews| Index: chrome/browser/chromeos/input_method/input_method_manager_impl.h |
| diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.h b/chrome/browser/chromeos/input_method/input_method_manager_impl.h |
| index 521e04aad54f7d4a69c7a246540c161c8d93293c..8f9f0a8ad8c1d0c2fdcdd26312e2898e40793be3 100644 |
| --- a/chrome/browser/chromeos/input_method/input_method_manager_impl.h |
| +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.h |
| @@ -58,11 +58,15 @@ class InputMethodManagerImpl : public InputMethodManager, |
| GetSupportedInputMethods() const OVERRIDE; |
| virtual scoped_ptr<InputMethodDescriptors> |
| GetActiveInputMethods() const OVERRIDE; |
| + virtual const std::vector<std::string>& GetActiveInputMethodIds() const |
| + OVERRIDE; |
| virtual size_t GetNumActiveInputMethods() const OVERRIDE; |
| virtual void EnableLayouts(const std::string& language_code, |
| const std::string& initial_layout) OVERRIDE; |
| virtual bool EnableInputMethods( |
| const std::vector<std::string>& new_active_input_method_ids) OVERRIDE; |
| + virtual bool EnableInputMethod(const std::string& new_active_input_method_id) |
| + OVERRIDE; |
| virtual bool MigrateOldInputMethods( |
| std::vector<std::string>* input_method_ids) OVERRIDE; |
| virtual bool MigrateKoreanKeyboard( |
| @@ -95,6 +99,8 @@ class InputMethodManagerImpl : public InputMethodManager, |
| virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE; |
| virtual ComponentExtensionIMEManager* |
| GetComponentExtensionIMEManager() OVERRIDE; |
| + virtual bool IsLanguageFullLatinKeyboard(const std::string& lang) const |
|
Seigo Nonaka
2013/07/11 09:43:56
As I mentioned in crbug.com/152843, please conside
Alexander Alekseev
2013/07/12 20:10:49
It has already been discussed a bit in https://cod
|
| + OVERRIDE; |
| // Sets |ibus_controller_|. |
| void SetIBusControllerForTesting(IBusController* ibus_controller); |
| @@ -107,6 +113,18 @@ class InputMethodManagerImpl : public InputMethodManager, |
| void InitializeComponentExtensionForTesting( |
| scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate); |
| + // For fast lookup "whether this language is among |
| + // listed in kFullLatinKeyboardLanguageList or not" |
| + class TwoLetterLanguageCode { |
| + public: |
| + TwoLetterLanguageCode() : val(0) {} |
| + TwoLetterLanguageCode(const char* lang); |
| + bool operator<(const TwoLetterLanguageCode& r) const { return val < r.val; } |
| + |
| + private: |
| + uint16_t val; |
| + }; |
| + |
| private: |
| // IBusController overrides: |
| virtual void PropertyChanged() OVERRIDE; |
| @@ -165,6 +183,15 @@ class InputMethodManagerImpl : public InputMethodManager, |
| // TODO(nona): Support dynamical unloading. |
| void LoadNecessaryComponentExtensions(); |
| + // Adds new input method to given list if possible |
| + bool EnableInputMethodImpl( |
| + const std::string& input_method_id, |
| + std::vector<std::string>& new_active_input_method_ids) const; |
| + |
| + // Start or stop the system input method framework as needed. |
|
Seigo Nonaka
2013/07/11 09:43:56
nit: Starts or stops
Alexander Alekseev
2013/07/12 20:10:49
Done.
|
| + // (after list of enabled input methods has been updated) |
| + void ReconfigureIMFramework(); |
| + |
| scoped_ptr<InputMethodDelegate> delegate_; |
| // The current browser status. |
| @@ -223,6 +250,9 @@ class InputMethodManagerImpl : public InputMethodManager, |
| base::WeakPtrFactory<InputMethodManagerImpl> weak_ptr_factory_; |
| + // Sorted vector of kFullLatinKeyboardLanguageList[] for fast lookup. |
| + std::vector<TwoLetterLanguageCode> full_latin_keyboard_languages_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl); |
| }; |