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

Unified Diff: ui/aura/mus/text_input_client_impl.cc

Issue 2957173004: Make DispatchKeyEventPostIME() asynchronous.
Patch Set: cleanup. Created 3 years, 5 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: ui/aura/mus/text_input_client_impl.cc
diff --git a/ui/aura/mus/text_input_client_impl.cc b/ui/aura/mus/text_input_client_impl.cc
index 9cc42c4ea4bd06394357b0132ae742cd63cbcc02..68663eec1e9c1676f3032525a54a117fb8482856 100644
--- a/ui/aura/mus/text_input_client_impl.cc
+++ b/ui/aura/mus/text_input_client_impl.cc
@@ -10,8 +10,12 @@
namespace aura {
-TextInputClientImpl::TextInputClientImpl(ui::TextInputClient* text_input_client)
- : text_input_client_(text_input_client), binding_(this) {}
+TextInputClientImpl::TextInputClientImpl(
+ ui::TextInputClient* text_input_client,
+ ui::internal::InputMethodDelegate* delegate)
+ : text_input_client_(text_input_client),
+ binding_(this),
+ delegate_(delegate) {}
TextInputClientImpl::~TextInputClientImpl() {}
@@ -43,4 +47,14 @@ void TextInputClientImpl::InsertChar(std::unique_ptr<ui::Event> event) {
text_input_client_->InsertChar(*event->AsKeyEvent());
}
+void TextInputClientImpl::DispatchKeyEventPostIME(
+ std::unique_ptr<ui::Event> event,
+ const DispatchKeyEventPostIMECallback& callback) {
+ if (delegate_) {
+ delegate_->DispatchKeyEventPostIME(
+ event->AsKeyEvent(),
+ base::MakeUnique<DispatchKeyEventPostIMECallback>(callback));
+ }
+}
+
} // namespace aura

Powered by Google App Engine
This is Rietveld 408576698