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

Unified Diff: services/ui/ime/test_ime_driver/test_ime_driver.cc

Issue 2412593002: IME for Mus: Send ack for key events after IME driver processes the event. (Closed)
Patch Set: Addressed feedback. Created 4 years, 2 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: services/ui/ime/test_ime_driver/test_ime_driver.cc
diff --git a/services/ui/ime/test_ime_driver/test_ime_driver.cc b/services/ui/ime/test_ime_driver/test_ime_driver.cc
index 97aa702755192b7d43b3c4250efcdd2705e60522..655de43566d5998f6365c5c3c538c8411894412a 100644
--- a/services/ui/ime/test_ime_driver/test_ime_driver.cc
+++ b/services/ui/ime/test_ime_driver/test_ime_driver.cc
@@ -20,7 +20,8 @@ class TestInputMethod : public mojom::InputMethod {
void OnTextInputModeChanged(mojom::TextInputMode text_input_mode) override {}
void OnTextInputTypeChanged(mojom::TextInputType text_input_type) override {}
void OnCaretBoundsChanged(const gfx::Rect& caret_bounds) override {}
- void ProcessKeyEvent(std::unique_ptr<Event> key_event) override {
+ void ProcessKeyEvent(std::unique_ptr<Event> key_event,
+ const ProcessKeyEventCallback& callback) override {
DCHECK(key_event->IsKeyEvent());
if (key_event->AsKeyEvent()->is_char()) {
@@ -29,8 +30,9 @@ class TestInputMethod : public mojom::InputMethod {
composition_event->type = mojom::CompositionEventType::INSERT_CHAR;
composition_event->key_event = std::move(key_event);
client_->OnCompositionEvent(std::move(composition_event));
+ callback.Run(true);
} else {
- client_->OnUnhandledEvent(std::move(key_event));
+ callback.Run(false);
}
};
sky 2016/10/14 22:15:51 no ';' here
void CancelComposition() override {}

Powered by Google App Engine
This is Rietveld 408576698