Index: ash/drag_drop/drag_drop_controller.h |
diff --git a/ash/drag_drop/drag_drop_controller.h b/ash/drag_drop/drag_drop_controller.h |
index 0f9b257f56237b1a6c895858451c6e76daea49f7..84ef0949f4c9fc7ecc7e3f61fc4951057e0c218b 100644 |
--- a/ash/drag_drop/drag_drop_controller.h |
+++ b/ash/drag_drop/drag_drop_controller.h |
@@ -6,6 +6,7 @@ |
#define ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ |
#pragma once |
+#include "ash/drag_drop/drag_drop_animation_observer_client.h" |
#include "ash/ash_export.h" |
#include "ui/aura/client/drag_drop_client.h" |
#include "ui/aura/event.h" |
@@ -20,6 +21,7 @@ class Window; |
} |
namespace ui { |
+class LayerAnimationObserver; |
class LayerAnimationSequence; |
} |
@@ -36,7 +38,7 @@ class DragImageView; |
class ASH_EXPORT DragDropController |
: public aura::client::DragDropClient, |
public aura::EventFilter, |
- public ui::LayerAnimationObserver { |
+ public DragDropAnimationObserverClient { |
public: |
DragDropController(); |
virtual ~DragDropController(); |
@@ -69,13 +71,9 @@ class ASH_EXPORT DragDropController |
private: |
friend class ash::test::DragDropControllerTest; |
- // Overridden from ui::LayerAnimationObserver: |
- virtual void OnLayerAnimationEnded( |
- const ui::LayerAnimationSequence* sequence) OVERRIDE; |
- virtual void OnLayerAnimationAborted( |
- const ui::LayerAnimationSequence* sequence) OVERRIDE; |
- virtual void OnLayerAnimationScheduled( |
- const ui::LayerAnimationSequence* sequence) OVERRIDE {} |
+ // Overridden from DragDropAnimationObserverClient: |
+ virtual void OnDragDropAnimationsCompleted( |
+ ui::ImplicitAnimationObserver* observer) OVERRIDE; |
// Helper method to start drag widget flying back animation. |
void StartCanceledAnimation(); |
@@ -95,6 +93,10 @@ class ASH_EXPORT DragDropController |
// Only be used for tests. |
bool should_block_during_drag_drop_; |
+ // The live observers. When the controller is destroyed, these observers are |
sky
2012/01/27 17:54:10
Update comment to reflect only one.
|
+ // removed and destroyed as well. The drag drop controller owns the observers. |
+ scoped_ptr<ui::ImplicitAnimationObserver> active_observer_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DragDropController); |
}; |