| Index: chrome/browser/ui/views/ime_driver/remote_text_input_client.cc
|
| diff --git a/chrome/browser/ui/views/ime_driver/remote_text_input_client.cc b/chrome/browser/ui/views/ime_driver/remote_text_input_client.cc
|
| index 93b7ff266c34fc7c22c56d7039bd07329d247472..81b56e9295c23f6176ea406eaaccb9fcba2939ce 100644
|
| --- a/chrome/browser/ui/views/ime_driver/remote_text_input_client.cc
|
| +++ b/chrome/browser/ui/views/ime_driver/remote_text_input_client.cc
|
| @@ -170,3 +170,30 @@ void RemoteTextInputClient::SetTextEditCommandForNextKeyEvent(
|
| // TODO(moshayedi): crbug.com/631527.
|
| NOTIMPLEMENTED();
|
| }
|
| +
|
| +ui::EventDispatchDetails RemoteTextInputClient::DispatchKeyEventPostIME(
|
| + ui::KeyEvent* event) {
|
| + return DispatchKeyEventPostIME(event, nullptr);
|
| +}
|
| +
|
| +ui::EventDispatchDetails RemoteTextInputClient::DispatchKeyEventPostIME(
|
| + ui::KeyEvent* event,
|
| + std::unique_ptr<base::Callback<void(bool)>> ack_callback) {
|
| + pending_callbacks_.push_back(std::move(ack_callback));
|
| + remote_client_->DispatchKeyEventPostIME(
|
| + ui::Event::Clone(*event),
|
| + base::Bind(&RemoteTextInputClient::DispatchKeyEventPostIMECallback,
|
| + base::Unretained(this)));
|
| + return ui::EventDispatchDetails();
|
| +}
|
| +
|
| +void RemoteTextInputClient::DispatchKeyEventPostIMECallback(
|
| + bool stopped_propagation) {
|
| + DCHECK(!pending_callbacks_.empty());
|
| + std::unique_ptr<base::Callback<void(bool)>> ack_callback =
|
| + std::move(pending_callbacks_.front());
|
| + pending_callbacks_.pop_front();
|
| +
|
| + if (ack_callback)
|
| + ack_callback->Run(stopped_propagation);
|
| +}
|
|
|