#include <vector>
#include "ash/ash_export.h"
+#include "ash/session/session_state_observer.h"
#include "ash/shelf/background_animator.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_types.h"
}
namespace ash {
-class ScreenAsh;
-class ShelfLayoutManagerObserver;
-class ShelfWidget;
-FORWARD_DECLARE_TEST(WebNotificationTrayTest, PopupAndFullscreen);
-
-namespace internal {
-
class PanelLayoutManagerTest;
+class ScreenAsh;
class ShelfBezelEventFilter;
+class ShelfLayoutManagerObserver;
class ShelfLayoutManagerTest;
+class ShelfWidget;
class StatusAreaWidget;
class WorkspaceController;
+FORWARD_DECLARE_TEST(WebNotificationTrayTest, PopupAndFullscreen);
// ShelfLayoutManager is the layout manager responsible for the shelf and
// status widgets. The shelf is given the total available width and told the
public aura::client::ActivationChangeObserver,
public DockedWindowLayoutManagerObserver,
public keyboard::KeyboardControllerObserver,
- public LockStateObserver {
+ public LockStateObserver,
+ public SessionStateObserver {
public:
// We reserve a small area on the edge of the workspace area to ensure that
// Size of the shelf when auto-hidden.
static const int kAutoHideSize;
- // The size of the shelf when shown (currently only used in alternate
- // settings see ash::switches::UseAlternateShelfLayout).
- static const int kShelfSize;
-
// Inset between the inner edge of the shelf (towards centre of screen), and
// the shelf items, notifications, status area etc.
static const int kShelfItemInset;
- // Returns the preferred size for the shelf (either kShelfPreferredSize or
- // kShelfSize).
- static int GetPreferredShelfSize();
-
explicit ShelfLayoutManager(ShelfWidget* shelf);
virtual ~ShelfLayoutManager();
// Overridden from ash::LockStateObserver:
virtual void OnLockStateEvent(LockStateObserver::EventType event) OVERRIDE;
+ // Overridden from ash::SessionStateObserver:
+ virtual void SessionStateChanged(
+ SessionStateDelegate::SessionState state) OVERRIDE;
+
// TODO(harrym|oshima): These templates will be moved to
// new Shelf class.
// A helper function that provides a shortcut for choosing
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;
+ // Returns true if the shelf should be forced to be visible.
+ bool IsShelfForcedToBeVisible() const;
// Overridden from keyboard::KeyboardControllerObserver:
- virtual void OnKeyboardBoundsChanging(
- const gfx::Rect& keyboard_bounds) OVERRIDE;
+ virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE;
// Overridden from DockedWindowLayoutManagerObserver:
virtual void OnDockBoundsChanging(
DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
};
-} // namespace internal
} // namespace ash
#endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_