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

Unified Diff: views/ime/mock_input_method.cc

Issue 6823055: Consolidate OnKeyEvent and InputMethod code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor X2Event handling, nix Windows InputMethodDelegate, etc. Created 9 years, 8 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
Index: views/ime/mock_input_method.cc
diff --git a/views/ime/mock_input_method.cc b/views/ime/mock_input_method.cc
index 8864552304f421ed34543f243e8f40cec5ac8220..22e2dd1eb4282f668d0d1042a539a3aaebee6f40 100644
--- a/views/ime/mock_input_method.cc
+++ b/views/ime/mock_input_method.cc
@@ -30,7 +30,7 @@ void MockInputMethod::Init(Widget* widget) {
InputMethodBase::Init(widget);
}
-void MockInputMethod::DispatchKeyEvent(const KeyEvent& key) {
+bool MockInputMethod::OnKeyEvent(const KeyEvent& key) {
bool handled = (composition_changed_ || result_text_.length()) &&
!IsTextInputTypeNone();
@@ -43,7 +43,7 @@ void MockInputMethod::DispatchKeyEvent(const KeyEvent& key) {
}
if (focus_changed_)
- return;
+ return true;
TextInputClient* client = GetTextInputClient();
if (client) {
@@ -63,6 +63,7 @@ void MockInputMethod::DispatchKeyEvent(const KeyEvent& key) {
}
ClearResult();
+ return true;
}
void MockInputMethod::OnTextInputTypeChanged(View* view) {

Powered by Google App Engine
This is Rietveld 408576698