diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 03:53:33 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 03:53:33 +0000 |
commit | 7841e11729ccad81685e9a43bd4f1fe817c6ece6 (patch) | |
tree | 1d468a88789838bcf86a8690fbc1aa85ed125a11 /ash/shelf/shelf_layout_manager.h | |
parent | 21cb28a3306ee9b5103089c961e837ac1cb88a0f (diff) | |
download | chromium_src-7841e11729ccad81685e9a43bd4f1fe817c6ece6.zip chromium_src-7841e11729ccad81685e9a43bd4f1fe817c6ece6.tar.gz chromium_src-7841e11729ccad81685e9a43bd4f1fe817c6ece6.tar.bz2 |
ash: Extract Observer out of ShelfLayoutManager.
- Moves it into its own header file.
- Add virtual destructor.
- Moves it out of internal namespace.
BUG=223936
TEST=Nope, this is just a simple clean up, no functionality intended.
R=jamescook@chromium.org,sadrul@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14562008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shelf/shelf_layout_manager.h')
-rw-r--r-- | ash/shelf/shelf_layout_manager.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h index ea86f15..d074e65 100644 --- a/ash/shelf/shelf_layout_manager.h +++ b/ash/shelf/shelf_layout_manager.h @@ -33,6 +33,7 @@ class GestureEvent; namespace ash { class ScreenAsh; +class ShelfLayoutManagerObserver; class ShelfWidget; namespace internal { @@ -54,24 +55,6 @@ class ASH_EXPORT ShelfLayoutManager : public keyboard::KeyboardControllerObserver { public: - // TODO(rharrison): Move this observer out of ash::internal:: - // namespace. Tracked in crosbug.com/223936 - 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(ShelfVisibilityState new_state) {} - - // Called when the auto hide state is changed. - virtual void OnAutoHideStateChanged(ShelfAutoHideState new_state) {} - - // Called when the auto hide behavior is changed. - virtual void OnAutoHideBehaviorChanged( - ShelfAutoHideBehavior new_behavior) {} - }; - // We reserve a small area on the edge of the workspace area to ensure that // the resize handle at the edge of the window can be hit. static const int kWorkspaceAreaVisibleInset; @@ -140,8 +123,8 @@ class ASH_EXPORT ShelfLayoutManager : void SetWindowOverlapsShelf(bool value); bool window_overlaps_shelf() const { return window_overlaps_shelf_; } - void AddObserver(Observer* observer); - void RemoveObserver(Observer* observer); + void AddObserver(ShelfLayoutManagerObserver* observer); + void RemoveObserver(ShelfLayoutManagerObserver* observer); // Gesture dragging related functions: void StartGestureDrag(const ui::GestureEvent& gesture); @@ -327,7 +310,7 @@ class ASH_EXPORT ShelfLayoutManager : // trigger showing the launcher. scoped_ptr<AutoHideEventFilter> event_filter_; - ObserverList<Observer> observers_; + ObserverList<ShelfLayoutManagerObserver> observers_; // The shelf reacts to gesture-drags, and can be set to auto-hide for certain // gestures. Some shelf behaviour (e.g. visibility state, background color |