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

Unified Diff: chrome/browser/ui/views/ime_driver/remote_text_input_client.cc

Issue 2626983003: IME for Mus: Send TextInputClient information to IMEDriver. (Closed)
Patch Set: fix mojo dependencies. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/ime_driver/remote_text_input_client.h ('k') | services/ui/ime/ime_server_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..93b7ff266c34fc7c22c56d7039bd07329d247472 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,30 @@
#include "base/strings/utf_string_conversions.h"
RemoteTextInputClient::RemoteTextInputClient(
- ui::mojom::TextInputClientPtr remote_client)
- : remote_client_(std::move(remote_client)) {}
+ ui::mojom::TextInputClientPtr remote_client,
+ ui::TextInputType text_input_type,
+ ui::TextInputMode text_input_mode,
+ base::i18n::TextDirection text_direction,
+ int text_input_flags,
+ gfx::Rect caret_bounds)
+ : remote_client_(std::move(remote_client)),
+ text_input_type_(text_input_type),
+ text_input_mode_(text_input_mode),
+ text_direction_(text_direction),
+ text_input_flags_(text_input_flags),
+ caret_bounds_(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 +58,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 +81,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(
« no previous file with comments | « chrome/browser/ui/views/ime_driver/remote_text_input_client.h ('k') | services/ui/ime/ime_server_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698