| 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 UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_ | 5 #ifndef UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_ |
| 6 #define UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_ | 6 #define UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/base/ime/chromeos/input_method_manager.h" | 9 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void SetInputMethodLoginDefaultFromVPD(const std::string& locale, | 46 void SetInputMethodLoginDefaultFromVPD(const std::string& locale, |
| 47 const std::string& layout) override; | 47 const std::string& layout) override; |
| 48 bool CanCycleInputMethod() override; | 48 bool CanCycleInputMethod() override; |
| 49 void SwitchToNextInputMethod() override; | 49 void SwitchToNextInputMethod() override; |
| 50 void SwitchToPreviousInputMethod() override; | 50 void SwitchToPreviousInputMethod() override; |
| 51 bool CanSwitchInputMethod(const ui::Accelerator& accelerator) override; | 51 bool CanSwitchInputMethod(const ui::Accelerator& accelerator) override; |
| 52 void SwitchInputMethod(const ui::Accelerator& accelerator) override; | 52 void SwitchInputMethod(const ui::Accelerator& accelerator) override; |
| 53 InputMethodDescriptor GetCurrentInputMethod() const override; | 53 InputMethodDescriptor GetCurrentInputMethod() const override; |
| 54 bool ReplaceEnabledInputMethods( | 54 bool ReplaceEnabledInputMethods( |
| 55 const std::vector<std::string>& new_active_input_method_ids) override; | 55 const std::vector<std::string>& new_active_input_method_ids) override; |
| 56 bool SetAllowedInputMethods( |
| 57 const std::vector<std::string>& new_allowed_input_method_ids) override; |
| 58 const std::vector<std::string>& GetAllowedInputMethods() override; |
| 56 | 59 |
| 57 // The active input method ids cache (actually default only) | 60 // The active input method ids cache (actually default only) |
| 58 std::vector<std::string> active_input_method_ids; | 61 std::vector<std::string> active_input_method_ids; |
| 59 | 62 |
| 60 protected: | 63 protected: |
| 61 friend base::RefCounted<InputMethodManager::State>; | 64 friend base::RefCounted<InputMethodManager::State>; |
| 62 ~State() override; | 65 ~State() override; |
| 63 | 66 |
| 64 private: | 67 private: |
| 68 // Allowed input methods ids |
| 69 std::vector<std::string> allowed_input_method_ids_; |
| 70 |
| 65 DISALLOW_COPY_AND_ASSIGN(State); | 71 DISALLOW_COPY_AND_ASSIGN(State); |
| 66 }; | 72 }; |
| 67 | 73 |
| 68 MockInputMethodManager(); | 74 MockInputMethodManager(); |
| 69 ~MockInputMethodManager() override; | 75 ~MockInputMethodManager() override; |
| 70 | 76 |
| 71 // InputMethodManager: | 77 // InputMethodManager: |
| 72 UISessionState GetUISessionState() override; | 78 UISessionState GetUISessionState() override; |
| 73 void AddObserver(InputMethodManager::Observer* observer) override; | 79 void AddObserver(InputMethodManager::Observer* observer) override; |
| 74 void AddCandidateWindowObserver( | 80 void AddCandidateWindowObserver( |
| (...skipping 28 matching lines...) Expand all Loading... |
| 103 bool IsEmojiHandwritingVoiceOnImeMenuEnabled() override; | 109 bool IsEmojiHandwritingVoiceOnImeMenuEnabled() override; |
| 104 | 110 |
| 105 private: | 111 private: |
| 106 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager); | 112 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager); |
| 107 }; | 113 }; |
| 108 | 114 |
| 109 } // namespace input_method | 115 } // namespace input_method |
| 110 } // namespace chromeos | 116 } // namespace chromeos |
| 111 | 117 |
| 112 #endif // UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_ | 118 #endif // UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_ |
| OLD | NEW |