| 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 b7705ad069c5ea3fad273b43d4117cb752bdd6e1..09fa9755574c9960e4fb9b89666e285a1e99d318 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
|
| @@ -12,11 +12,26 @@
|
| #include "base/strings/utf_string_conversions.h"
|
|
|
| RemoteTextInputClient::RemoteTextInputClient(
|
| + ui::mojom::TextInputClientInformationPtr client_info,
|
| ui::mojom::TextInputClientPtr remote_client)
|
| - : remote_client_(std::move(remote_client)) {}
|
| + : remote_client_(std::move(remote_client)),
|
| + text_input_type_(client_info->text_input_type),
|
| + text_input_mode_(client_info->text_input_mode),
|
| + text_direction_(client_info->text_direction),
|
| + text_input_flags_(client_info->text_input_flags),
|
| + caret_bounds_(client_info->caret_bounds) {}
|
|
|
| RemoteTextInputClient::~RemoteTextInputClient() {}
|
|
|
| +void RemoteTextInputClient::SetTextInputType(
|
| + ui::TextInputType text_input_type) {
|
| + text_input_type_ = text_input_type;
|
| +}
|
| +
|
| +void RemoteTextInputClient::SetCaretBounds(const gfx::Rect& caret_bounds) {
|
| + caret_bounds_ = caret_bounds;
|
| +}
|
| +
|
| void RemoteTextInputClient::SetCompositionText(
|
| const ui::CompositionText& composition) {
|
| remote_client_->SetCompositionText(composition);
|
| @@ -39,27 +54,19 @@ void RemoteTextInputClient::InsertChar(const ui::KeyEvent& event) {
|
| }
|
|
|
| ui::TextInputType RemoteTextInputClient::GetTextInputType() const {
|
| - // TODO(moshayedi): crbug.com/631527.
|
| - NOTIMPLEMENTED();
|
| - return ui::TEXT_INPUT_TYPE_TEXT;
|
| + return text_input_type_;
|
| }
|
|
|
| ui::TextInputMode RemoteTextInputClient::GetTextInputMode() const {
|
| - // TODO(moshayedi): crbug.com/631527.
|
| - NOTIMPLEMENTED();
|
| - return ui::TEXT_INPUT_MODE_DEFAULT;
|
| + return text_input_mode_;
|
| }
|
|
|
| base::i18n::TextDirection RemoteTextInputClient::GetTextDirection() const {
|
| - // TODO(moshayedi): crbug.com/631527.
|
| - NOTIMPLEMENTED();
|
| - return base::i18n::UNKNOWN_DIRECTION;
|
| + return text_direction_;
|
| }
|
|
|
| int RemoteTextInputClient::GetTextInputFlags() const {
|
| - // TODO(moshayedi): crbug.com/631527.
|
| - NOTIMPLEMENTED();
|
| - return 0;
|
| + return text_input_flags_;
|
| }
|
|
|
| bool RemoteTextInputClient::CanComposeInline() const {
|
| @@ -70,9 +77,7 @@ bool RemoteTextInputClient::CanComposeInline() const {
|
| }
|
|
|
| gfx::Rect RemoteTextInputClient::GetCaretBounds() const {
|
| - // TODO(moshayedi): crbug.com/631527.
|
| - NOTIMPLEMENTED();
|
| - return gfx::Rect();
|
| + return caret_bounds_;
|
| }
|
|
|
| bool RemoteTextInputClient::GetCompositionCharacterBounds(
|
|
|