Index: ash/wm/shelf_layout_manager.h |
diff --git a/ash/wm/shelf_layout_manager.h b/ash/wm/shelf_layout_manager.h |
index dac537abc70a67899629c6dac213aa1e674ab98b..2a4412c033ac61973d2007353e824c82247106c3 100644 |
--- a/ash/wm/shelf_layout_manager.h |
+++ b/ash/wm/shelf_layout_manager.h |
@@ -12,6 +12,7 @@ |
#include "ash/wm/shelf_types.h" |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "base/observer_list.h" |
#include "base/timer.h" |
#include "ui/aura/client/activation_change_observer.h" |
#include "ui/aura/layout_manager.h" |
@@ -59,6 +60,18 @@ class ASH_EXPORT ShelfLayoutManager : |
AUTO_HIDE_HIDDEN, |
}; |
+ class ASH_EXPORT Observer { |
+ public: |
+ // Called when the target ShelfLayoutManager will be deleted. |
+ virtual void WillDeleteShelf() {} |
+ |
+ // Called when the visibility change is scheduled. |
+ virtual void WillChangeVisibilityState(VisibilityState new_state) {} |
+ |
+ // Called when the auto hide state is changed. |
+ virtual void OnAutoHideStateChanged(AutoHideState new_state) {} |
+ }; |
+ |
// We reserve a small area at the bottom of the workspace area to ensure that |
// the bottom-of-window resize handle can be hit. |
// TODO(jamescook): Some day we may want the workspace area to be an even |
@@ -130,6 +143,9 @@ class ASH_EXPORT ShelfLayoutManager : |
// the shelf renders slightly differently. |
void SetWindowOverlapsShelf(bool value); |
+ void AddObserver(Observer* observer); |
+ void RemoveObserver(Observer* observer); |
+ |
// Overridden from aura::LayoutManager: |
virtual void OnWindowResized() OVERRIDE; |
virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; |
@@ -252,6 +268,8 @@ class ASH_EXPORT ShelfLayoutManager : |
// trigger showing the launcher. |
scoped_ptr<AutoHideEventFilter> event_filter_; |
+ ObserverList<Observer> observers_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
}; |