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

Unified Diff: ui/views/ime/mock_input_method.h

Issue 782673002: MacViews: tryjobs for toolkit_views=1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: latest crrev/901823002 Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/ime/input_method_bridge.cc ('k') | ui/views/ime/mock_input_method.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « ui/views/ime/input_method_bridge.cc ('k') | ui/views/ime/mock_input_method.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698