Commit b550fcc1 authored by Blake O'Hare's avatar Blake O'Hare Committed by Commit Bot

Update PanelLayoutManager to use Keyboard occluded bounds

OnKeyboardBoundsChanging is being split into several more specific
methods that have a stronger contract of how they are being used by the
implementer. More information about why this is being done is in the
associated bug.

OnKeyboardWorkspaceOccludedBoundChanging is called when the keyboard's
bounds change in a way that makes certain regions of the workspace
unusable, as far as workspace layout is concerned. When the keyboard's
bounds change in a way that is purely visual or the keyboard is in a
mode where it shouldn't affect workspace layout (such as a floating
keyboard), this method will not be called.

Bug: 786290
Change-Id: I4237be051b1a4bb3cf6eeff5598079205b4e1292
Reviewed-on: https://chromium-review.googlesource.com/804626Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Blake O'Hare <blakeo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521580}
parent 9fa6de06
......@@ -902,7 +902,7 @@ void PanelLayoutManager::UpdateCallouts() {
////////////////////////////////////////////////////////////////////////////////
// keyboard::KeyboardControllerObserver implementation:
void PanelLayoutManager::OnKeyboardBoundsChanging(
void PanelLayoutManager::OnKeyboardWorkspaceOccludedBoundsChanging(
const gfx::Rect& keyboard_bounds) {
const gfx::Rect& parent_bounds = panel_container_->bounds();
int available_space = parent_bounds.height() - keyboard_bounds.height();
......
......@@ -170,7 +170,8 @@ class ASH_EXPORT PanelLayoutManager
void UpdateCallouts();
// Overridden from keyboard::KeyboardControllerObserver:
void OnKeyboardBoundsChanging(const gfx::Rect& keyboard_bounds) override;
void OnKeyboardWorkspaceOccludedBoundsChanging(
const gfx::Rect& keyboard_bounds) override;
void OnKeyboardClosed() override;
// Parent window associated with this layout manager.
......
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