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

Unified Diff: ui/base/ime/input_method_base.cc

Issue 2553603002: New accessibility virtual keyboard behavior in non-sticky mode. (Closed)
Patch Set: rebase Created 3 years, 7 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 | « ui/base/ime/input_method_base.h ('k') | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_base.cc
diff --git a/ui/base/ime/input_method_base.cc b/ui/base/ime/input_method_base.cc
index 492d7f9a5e06700b527e90f9f6a60b9ae97c6503..f436c5d5199ada5cdcf1ed8e6501cbea8b0ebfc7 100644
--- a/ui/base/ime/input_method_base.cc
+++ b/ui/base/ime/input_method_base.cc
@@ -63,6 +63,12 @@ TextInputClient* InputMethodBase::GetTextInputClient() const {
return text_input_client_;
}
+void InputMethodBase::SetOnScreenKeyboardBounds(const gfx::Rect& new_bounds) {
+ keyboard_bounds_ = new_bounds;
+ if (text_input_client_)
+ text_input_client_->EnsureCaretNotInRect(keyboard_bounds_);
+}
+
void InputMethodBase::OnTextInputTypeChanged(const TextInputClient* client) {
if (!IsTextInputClientFocused(client))
return;
@@ -152,6 +158,10 @@ void InputMethodBase::SetFocusedTextInputClientInternal(
text_input_client_ = client; // nullptr allowed.
OnDidChangeFocusedClient(old, client);
NotifyTextInputStateChanged(text_input_client_);
+
+ // Move new focused window if necessary.
+ if (text_input_client_)
+ text_input_client_->EnsureCaretNotInRect(keyboard_bounds_);
}
std::vector<gfx::Rect> InputMethodBase::GetCompositionBounds(
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698