Commit 9f6ded29 authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

[VK] Inline NotifyKeyboardBoundsChangingAndEnsureCaretInWorkArea.

We don't get much out of this being a function.

TBR=blakeo@chromium.org

Change-Id: If29f63899374d91ab67ab91c9068d31eb0f82a3e
Reviewed-on: https://chromium-review.googlesource.com/1148096Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577459}
parent ef124da3
......@@ -473,7 +473,12 @@ void KeyboardController::HideAnimationFinished() {
void KeyboardController::ShowAnimationFinished() {
MarkKeyboardLoadFinished();
NotifyKeyboardBoundsChangingAndEnsureCaretInWorkArea();
// Notify observers after animation finished to prevent reveal desktop
// background during animation.
NotifyKeyboardBoundsChanging(GetKeyboardWindow()->bounds());
ui_->EnsureCaretInWorkArea(
container_behavior_->GetOccludedBounds(GetKeyboardWindow()->bounds()));
}
void KeyboardController::SetContainerBehaviorInternal(
......@@ -698,15 +703,6 @@ bool KeyboardController::WillHideKeyboard() const {
return res;
}
void KeyboardController::
NotifyKeyboardBoundsChangingAndEnsureCaretInWorkArea() {
// Notify observers after animation finished to prevent reveal desktop
// background during animation.
NotifyKeyboardBoundsChanging(GetKeyboardWindow()->bounds());
ui_->EnsureCaretInWorkArea(
container_behavior_->GetOccludedBounds(GetKeyboardWindow()->bounds()));
}
void KeyboardController::NotifyKeyboardConfigChanged() {
for (KeyboardControllerObserver& observer : observer_list_)
observer.OnKeyboardConfigChanged();
......
......@@ -300,8 +300,6 @@ class KEYBOARD_EXPORT KeyboardController
// Called when the show animation finished.
void ShowAnimationFinished();
void NotifyKeyboardBoundsChangingAndEnsureCaretInWorkArea();
// Notifies keyboard config change to the observers.
// Only called from |UpdateKeyboardConfig| in keyboard_util.
void NotifyKeyboardConfigChanged();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment