diff options
author | bryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-29 20:52:48 +0000 |
---|---|---|
committer | bryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-29 20:52:48 +0000 |
commit | 5416f28fdc1761075f31678b4893b14b8c426dd7 (patch) | |
tree | badf29574f11eb6eb80fa23e8b2be96e05740d5f /ash/shelf/shelf_layout_manager.h | |
parent | e9b8ca8230f9f5f0238289952a8ff54efac7edd9 (diff) | |
download | chromium_src-5416f28fdc1761075f31678b4893b14b8c426dd7.zip chromium_src-5416f28fdc1761075f31678b4893b14b8c426dd7.tar.gz chromium_src-5416f28fdc1761075f31678b4893b14b8c426dd7.tar.bz2 |
Partial fix for keyboard occlusion.
This fixes three aspects of keyboard occlusion. When the keyboard is
showing:
- full-screen windows are resized to still be 100% visible
- panels are moved above the keyboard
- the shelf is hidden
This CL does not address:
- moving focused text fields into view in web pages
BUG=235157
Review URL: https://chromiumcodereview.appspot.com/14477010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197129 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shelf/shelf_layout_manager.h')
-rw-r--r-- | ash/shelf/shelf_layout_manager.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h index 30ed3e5..2cea12e 100644 --- a/ash/shelf/shelf_layout_manager.h +++ b/ash/shelf/shelf_layout_manager.h @@ -20,6 +20,8 @@ #include "ui/aura/layout_manager.h" #include "ui/gfx/insets.h" #include "ui/gfx/rect.h" +#include "ui/keyboard/keyboard_controller.h" +#include "ui/keyboard/keyboard_controller_observer.h" namespace aura { class RootWindow; @@ -48,7 +50,8 @@ class WorkspaceController; class ASH_EXPORT ShelfLayoutManager : public aura::LayoutManager, public ash::ShellObserver, - public aura::client::ActivationChangeObserver { + public aura::client::ActivationChangeObserver, + public keyboard::KeyboardControllerObserver { public: // TODO(rharrison): Move this observer out of ash::internal:: @@ -279,6 +282,14 @@ class ASH_EXPORT ShelfLayoutManager : int GetWorkAreaSize(const State& state, int size) const; + // Return the bounds available in the parent, taking into account the bounds + // of the keyboard if necessary. + gfx::Rect GetAvailableBounds() const; + + // Overridden from keyboard::KeyboardControllerObserver: + virtual void OnKeyboardBoundsChanging( + const gfx::Rect& keyboard_bounds) OVERRIDE; + // The RootWindow is cached so that we don't invoke Shell::GetInstance() from // our destructor. We avoid that as at the time we're deleted Shell is being // deleted too. @@ -332,6 +343,9 @@ class ASH_EXPORT ShelfLayoutManager : // Used to delay updating shelf background. UpdateShelfObserver* update_shelf_observer_; + // The bounds of the keyboard. + gfx::Rect keyboard_bounds_; + DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); }; |