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; |