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

Unified Diff: ui/views/animation/bounds_animator.h

Issue 10068027: ash: Fix launcher icon overlaps with status. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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/test/launcher_view_test_api.cc ('k') | ui/views/animation/bounds_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/bounds_animator.h
diff --git a/ui/views/animation/bounds_animator.h b/ui/views/animation/bounds_animator.h
index d0e2c2e90f665737a77f8667689a3e1ea1dbdd0a..f84c2d0f410a2f43b6d4ba3e0c4d0149f8d5082b 100644
--- a/ui/views/animation/bounds_animator.h
+++ b/ui/views/animation/bounds_animator.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,6 +10,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/observer_list.h"
#include "ui/base/animation/animation_container_observer.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/gfx/rect.h"
@@ -24,7 +25,7 @@ namespace views {
class BoundsAnimator;
class View;
-class BoundsAnimatorObserver {
+class VIEWS_EXPORT BoundsAnimatorObserver {
public:
// Invoked when all animations are complete.
virtual void OnBoundsAnimatorDone(BoundsAnimator* animator) = 0;
@@ -92,9 +93,12 @@ class VIEWS_EXPORT BoundsAnimator : public ui::AnimationDelegate,
// size. Any views marked for deletion are deleted.
void Cancel();
- void set_observer(BoundsAnimatorObserver* observer) {
- observer_ = observer;
- }
+ // Overrides default animation duration. |duration_ms| is the new duration in
+ // milliseconds.
+ void SetAnimationDuration(int duration_ms);
+
+ void AddObserver(BoundsAnimatorObserver* observer);
+ void RemoveObserver(BoundsAnimatorObserver* observer);
protected:
// Creates the animation to use for animating views.
@@ -165,7 +169,7 @@ class VIEWS_EXPORT BoundsAnimator : public ui::AnimationDelegate,
// Parent of all views being animated.
View* parent_;
- BoundsAnimatorObserver* observer_;
+ ObserverList<BoundsAnimatorObserver> observers_;
// All animations we create up with the same container.
scoped_refptr<ui::AnimationContainer> container_;
@@ -182,6 +186,8 @@ class VIEWS_EXPORT BoundsAnimator : public ui::AnimationDelegate,
// to repaint these bounds.
gfx::Rect repaint_bounds_;
+ int animation_duration_ms_;
+
DISALLOW_COPY_AND_ASSIGN(BoundsAnimator);
};
« no previous file with comments | « ash/test/launcher_view_test_api.cc ('k') | ui/views/animation/bounds_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698