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

Unified Diff: ui/keyboard/keyboard_controller.cc

Issue 501293002: Revert of Keep virtual keyboard visibility the same after enable an IME in a different extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/keyboard_layout_manager.cc » ('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 02bd0b7b8a0e5ab01b56bde82e02c2dc0b529576..029a5a43d4b1b6d68eec05dd36221290907ce83c 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -206,7 +206,6 @@
virtual void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
};
void WindowBoundsChangeObserver::OnWindowBoundsChanged(aura::Window* window,
@@ -214,11 +213,6 @@
KeyboardController* controller = KeyboardController::GetInstance();
if (controller)
controller->UpdateWindowInsets(window);
-}
-
-void WindowBoundsChangeObserver::OnWindowDestroyed(aura::Window* window) {
- if (window->HasObserver(this))
- window->RemoveObserver(this);
}
// static
@@ -294,10 +288,7 @@
// the render process crashed.
if (view) {
aura::Window *window = view->GetNativeView();
- // If virtual keyboard failed to load, a widget that displays error
- // message will be created and adds as a child of the virtual keyboard
- // window. We want to avoid add BoundsChangedObserver to that window.
- if (GetFrameWindow(window) != keyboard_window &&
+ if (window != keyboard_window &&
window->GetRootWindow() == root_window) {
gfx::Rect window_bounds = window->GetBoundsInScreen();
gfx::Rect intersect = gfx::IntersectRects(window_bounds,
@@ -369,12 +360,8 @@
}
void KeyboardController::Reload() {
- if (proxy_->HasKeyboardWindow()) {
- // A reload should never try to show virtual keyboard. If keyboard is not
- // visible before reload, it should keep invisible after reload.
- show_on_resize_ = false;
+ if (proxy_->HasKeyboardWindow())
proxy_->ReloadKeyboardIfNeeded();
- }
}
void KeyboardController::OnTextInputStateChanged(
@@ -466,12 +453,8 @@
proxy_->ReloadKeyboardIfNeeded();
- if (keyboard_visible_) {
- return;
- } else if (proxy_->GetKeyboardWindow()->bounds().height() == 0) {
- show_on_resize_ = true;
- return;
- }
+ if (keyboard_visible_ || proxy_->GetKeyboardWindow()->bounds().height() == 0)
+ return;
keyboard_visible_ = true;
« no previous file with comments | « ui/keyboard/keyboard_controller.h ('k') | ui/keyboard/keyboard_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698