Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2371)

Unified Diff: ash/shelf/shelf_layout_manager.h

Issue 14477010: Partial fix for keyboard occlusion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gyp fix Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.h
diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h
index 30ed3e522915e5653163c1b434fff4536951896c..2cea12e175816f5a23b5e6ca41c3ea32095aa3d5 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);
};
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698