Index: ash/wm/shelf_layout_manager.h |
=================================================================== |
--- ash/wm/shelf_layout_manager.h (revision 120096) |
+++ ash/wm/shelf_layout_manager.h (working copy) |
@@ -28,7 +28,7 @@ |
// To respond to bounds changes in the status area StatusAreaLayoutManager works |
// closely with ShelfLayoutManager. |
class ASH_EXPORT ShelfLayoutManager : public aura::LayoutManager, |
- public ui::ImplicitAnimationObserver { |
+ public ui::LayerAnimationObserver { |
public: |
ShelfLayoutManager(views::Widget* launcher, views::Widget* status); |
virtual ~ShelfLayoutManager(); |
@@ -41,7 +41,7 @@ |
// Sets the visibility of the shelf to |visible|. |
void SetVisible(bool visible); |
- bool visible() const { return visible_; } |
+ bool visible() const { return animating_ ? !visible_ : visible_; } |
views::Widget* launcher() { return launcher_; } |
views::Widget* status() { return status_; } |
@@ -72,9 +72,22 @@ |
void CalculateTargetBounds(bool visible, |
TargetBounds* target_bounds); |
- // Implementation of ImplicitAnimationObserver |
- virtual void OnImplicitAnimationsCompleted() OVERRIDE; |
+ // Animates |widget| to the specified bounds and opacity. |
+ void AnimateWidgetTo(views::Widget* widget, |
+ const gfx::Rect& target_bounds, |
+ float target_opacity); |
+ // LayerAnimationObserver overrides: |
+ virtual void OnLayerAnimationEnded( |
+ const ui::LayerAnimationSequence* sequence) OVERRIDE; |
+ virtual void OnLayerAnimationAborted( |
+ const ui::LayerAnimationSequence* sequence) OVERRIDE {} |
+ virtual void OnLayerAnimationScheduled( |
+ const ui::LayerAnimationSequence* sequence) OVERRIDE {} |
+ |
+ // Are we animating? |
+ bool animating_; |
+ |
// True when inside LayoutShelf method. Used to prevent calling LayoutShelf |
// again from SetChildBounds(). |
bool in_layout_; |