Index: ui/views/ime/mock_input_method.h |
diff --git a/ui/views/ime/mock_input_method.h b/ui/views/ime/mock_input_method.h |
index 19d8dc5f750b5ee769d0af956b3758d2be51787b..82d5be10948156be3f52b82779693c094e126524 100644 |
--- a/ui/views/ime/mock_input_method.h |
+++ b/ui/views/ime/mock_input_method.h |
@@ -23,7 +23,6 @@ class VIEWS_EXPORT MockInputMethod : public InputMethodBase { |
~MockInputMethod() override; |
// Overridden from InputMethod: |
- void Init(Widget* widget) override; |
void OnFocus() override; |
void OnBlur() override; |
bool OnUntranslatedIMEMessage(const base::NativeEvent& event, |
@@ -39,14 +38,11 @@ class VIEWS_EXPORT MockInputMethod : public InputMethodBase { |
void ShowImeIfNeeded() override; |
bool IsMock() const override; |
- bool focus_changed() const { return focus_changed_; } |
bool untranslated_ime_message_called() const { |
return untranslated_ime_message_called_; |
} |
bool text_input_type_changed() const { return text_input_type_changed_; } |
- bool caret_bounds_changed() const { return caret_bounds_changed_; } |
bool cancel_composition_called() const { return cancel_composition_called_; } |
- bool input_locale_changed() const { return input_locale_changed_; } |
// Clears all internal states and result. |
void Clear(); |
@@ -54,8 +50,12 @@ class VIEWS_EXPORT MockInputMethod : public InputMethodBase { |
void SetCompositionTextForNextKey(const ui::CompositionText& composition); |
void SetResultTextForNextKey(const base::string16& result); |
- void SetInputLocale(const std::string& locale); |
- void SetActive(bool active); |
+ // Insert a mock composition directly into the TextInputClient. |
+ void InsertMockComposition(); |
+ // Whether InsertMockComposition() would add a mock composition to the client. |
+ bool HasMockComposition(); |
+ // Clear any mock composition. |
+ void ClearMockComposition(); |
private: |
// Overridden from InputMethodBase. |
@@ -64,13 +64,9 @@ class VIEWS_EXPORT MockInputMethod : public InputMethodBase { |
// Clears boolean states defined below. |
void ClearStates(); |
- // Clears only composition information and result text. |
- void ClearResult(); |
- |
// Composition information for the next key event. It'll be cleared |
// automatically after dispatching the next key event. |
ui::CompositionText composition_; |
- bool composition_changed_; |
// Result text for the next key event. It'll be cleared automatically after |
// dispatching the next key event. |
@@ -78,16 +74,9 @@ class VIEWS_EXPORT MockInputMethod : public InputMethodBase { |
// Record call state of corresponding methods. They will be set to false |
// automatically before dispatching a key event. |
- bool focus_changed_; |
bool untranslated_ime_message_called_; |
bool text_input_type_changed_; |
- bool caret_bounds_changed_; |
bool cancel_composition_called_; |
- bool input_locale_changed_; |
- |
- // To mock corresponding input method prooperties. |
- std::string locale_; |
- bool active_; |
DISALLOW_COPY_AND_ASSIGN(MockInputMethod); |
}; |