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

Unified Diff: ash/wm/shelf_layout_manager.h

Issue 10701051: Polish launcher tooltip visibility (2nd try). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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/shell.cc ('k') | ash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698