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

Unified Diff: ui/keyboard/keyboard_controller.cc

Issue 826713002: [ChromeOS] Show autofill popup after keyboard (if any) is shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable autofill popup waiting for keyboard when keyboard has been disabled. Created 5 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 | « ui/keyboard/keyboard_controller.h ('k') | ui/keyboard/webui/vk_mojo_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller.cc
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index 34d5a68310f526f2313b1caaed8758b1c716ad7f..2bb91e4b6325040e91c1902b1fe217dda88a9189 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -245,6 +245,7 @@ KeyboardController::KeyboardController(KeyboardControllerProxy* proxy)
weak_factory_(this) {
CHECK(proxy);
input_method_ = proxy_->GetInputMethod();
+ input_method_->SetSupportsOnScreenKeyboard(true);
input_method_->AddObserver(this);
window_bounds_observer_.reset(new WindowBoundsChangeObserver());
}
@@ -252,8 +253,10 @@ KeyboardController::KeyboardController(KeyboardControllerProxy* proxy)
KeyboardController::~KeyboardController() {
if (container_)
container_->RemoveObserver(this);
- if (input_method_)
+ if (input_method_) {
input_method_->RemoveObserver(this);
+ input_method_->SetSupportsOnScreenKeyboard(false);
+ }
ResetWindowInsets();
}
@@ -432,6 +435,8 @@ void KeyboardController::OnShowImeIfNeeded() {
ShowKeyboardInternal();
}
+void KeyboardController::OnKeyboardBoundsUnchanged() {}
+
bool KeyboardController::ShouldEnableInsets(aura::Window* window) {
aura::Window *keyboard_window = proxy_->GetKeyboardWindow();
return (keyboard_window->GetRootWindow() == window->GetRootWindow() &&
@@ -478,6 +483,7 @@ void KeyboardController::ShowKeyboardInternal() {
proxy_->ReloadKeyboardIfNeeded();
if (keyboard_visible_) {
+ proxy_->GetInputMethod()->NotifyKeyboardBoundsUnchanged();
return;
} else if (proxy_->GetKeyboardWindow()->bounds().height() == 0) {
show_on_resize_ = true;
« no previous file with comments | « ui/keyboard/keyboard_controller.h ('k') | ui/keyboard/webui/vk_mojo_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698