Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ash / shelf / shelf_layout_manager.h
index 4e03c7a..f0acb42 100644 (file)
@@ -8,6 +8,7 @@
 #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"
@@ -38,18 +39,15 @@ class ImplicitAnimationObserver;
 }
 
 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
@@ -63,7 +61,8 @@ class ASH_EXPORT ShelfLayoutManager :
     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
@@ -77,18 +76,10 @@ class ASH_EXPORT ShelfLayoutManager :
   // 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();
 
@@ -194,6 +185,10 @@ class ASH_EXPORT 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
@@ -326,13 +321,11 @@ 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;
+  // 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(
@@ -417,7 +410,6 @@ class ASH_EXPORT ShelfLayoutManager :
   DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
 };
 
-}  // namespace internal
 }  // namespace ash
 
 #endif  // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_