| Index: ui/keyboard/keyboard_controller.cc
|
| diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
|
| index 0977f892ed07456cde323c075665755a9841df80..cc031c56a0e0066462ad8e98bd6b8821164dde0f 100644
|
| --- a/ui/keyboard/keyboard_controller.cc
|
| +++ b/ui/keyboard/keyboard_controller.cc
|
| @@ -147,6 +147,16 @@ aura::Window* KeyboardController::GetContainerWindow() {
|
| return container_;
|
| }
|
|
|
| +void KeyboardController::HideKeyboard() {
|
| + keyboard_visible_ = false;
|
| +
|
| + FOR_EACH_OBSERVER(KeyboardControllerObserver,
|
| + observer_list_,
|
| + OnKeyboardBoundsChanging(gfx::Rect()));
|
| +
|
| + proxy_->HideKeyboardContainer(container_);
|
| +}
|
| +
|
| void KeyboardController::AddObserver(KeyboardControllerObserver* observer) {
|
| observer_list_.AddObserver(observer);
|
| }
|
| @@ -199,6 +209,8 @@ void KeyboardController::OnTextInputStateChanged(
|
| OnKeyboardBoundsChanging(container_->children()[0]->bounds()));
|
| proxy_->ShowKeyboardContainer(container_);
|
| } else {
|
| + // Set the visibility state here so that any queries for visibility
|
| + // before the timer fires returns the correct future value.
|
| keyboard_visible_ = false;
|
| base::MessageLoop::current()->PostDelayedTask(
|
| FROM_HERE,
|
| @@ -218,13 +230,6 @@ void KeyboardController::OnInputMethodDestroyed(
|
| input_method_ = NULL;
|
| }
|
|
|
| -void KeyboardController::HideKeyboard() {
|
| - FOR_EACH_OBSERVER(KeyboardControllerObserver,
|
| - observer_list_,
|
| - OnKeyboardBoundsChanging(gfx::Rect()));
|
| - proxy_->HideKeyboardContainer(container_);
|
| -}
|
| -
|
| bool KeyboardController::WillHideKeyboard() const {
|
| return weak_factory_.HasWeakPtrs();
|
| }
|
|
|