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

Side by Side Diff: views/animation/bounds_animator.h

Issue 7550038: Rename VIEWS_API to VIEWS_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/accelerator.h ('k') | views/background.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ 5 #ifndef VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_
6 #define VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ 6 #define VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "ui/base/animation/animation_container_observer.h" 12 #include "ui/base/animation/animation_container_observer.h"
13 #include "ui/base/animation/animation_delegate.h" 13 #include "ui/base/animation/animation_delegate.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 #include "views/views_api.h" 15 #include "views/views_export.h"
16 16
17 namespace ui { 17 namespace ui {
18 class SlideAnimation; 18 class SlideAnimation;
19 } 19 }
20 20
21 namespace views { 21 namespace views {
22 22
23 class BoundsAnimator; 23 class BoundsAnimator;
24 class View; 24 class View;
25 25
26 class BoundsAnimatorObserver { 26 class BoundsAnimatorObserver {
27 public: 27 public:
28 // Invoked when all animations are complete. 28 // Invoked when all animations are complete.
29 virtual void OnBoundsAnimatorDone(BoundsAnimator* animator) = 0; 29 virtual void OnBoundsAnimatorDone(BoundsAnimator* animator) = 0;
30 }; 30 };
31 31
32 // Bounds animator is responsible for animating the bounds of a view from the 32 // Bounds animator is responsible for animating the bounds of a view from the
33 // the views current location and size to a target position and size. To use 33 // the views current location and size to a target position and size. To use
34 // BoundsAnimator invoke AnimateViewTo for the set of views you want to 34 // BoundsAnimator invoke AnimateViewTo for the set of views you want to
35 // animate. 35 // animate.
36 // 36 //
37 // BoundsAnimator internally creates an animation for each view. If you need 37 // BoundsAnimator internally creates an animation for each view. If you need
38 // a specific animation invoke SetAnimationForView after invoking AnimateViewTo. 38 // a specific animation invoke SetAnimationForView after invoking AnimateViewTo.
39 // You can attach an AnimationDelegate to the individual animation for a view 39 // You can attach an AnimationDelegate to the individual animation for a view
40 // by way of SetAnimationDelegate. Additionally you can attach an observer to 40 // by way of SetAnimationDelegate. Additionally you can attach an observer to
41 // the BoundsAnimator that is notified when all animations are complete. 41 // the BoundsAnimator that is notified when all animations are complete.
42 class VIEWS_API BoundsAnimator : public ui::AnimationDelegate, 42 class VIEWS_EXPORT BoundsAnimator : public ui::AnimationDelegate,
43 public ui::AnimationContainerObserver { 43 public ui::AnimationContainerObserver {
44 public: 44 public:
45 // If |delete_when_done| is set to true in |SetAnimationDelegate| the 45 // If |delete_when_done| is set to true in |SetAnimationDelegate| the
46 // |AnimationDelegate| must subclass this class. 46 // |AnimationDelegate| must subclass this class.
47 class OwnedAnimationDelegate : public ui::AnimationDelegate { 47 class OwnedAnimationDelegate : public ui::AnimationDelegate {
48 public: 48 public:
49 virtual ~OwnedAnimationDelegate() {} 49 virtual ~OwnedAnimationDelegate() {}
50 }; 50 };
51 51
52 explicit BoundsAnimator(View* view); 52 explicit BoundsAnimator(View* view);
53 virtual ~BoundsAnimator(); 53 virtual ~BoundsAnimator();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // the timer (AnimationContainerProgressed is invoked) the parent_ is asked 179 // the timer (AnimationContainerProgressed is invoked) the parent_ is asked
180 // to repaint these bounds. 180 // to repaint these bounds.
181 gfx::Rect repaint_bounds_; 181 gfx::Rect repaint_bounds_;
182 182
183 DISALLOW_COPY_AND_ASSIGN(BoundsAnimator); 183 DISALLOW_COPY_AND_ASSIGN(BoundsAnimator);
184 }; 184 };
185 185
186 } // namespace views 186 } // namespace views
187 187
188 #endif // VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ 188 #endif // VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_
OLDNEW
« no previous file with comments | « views/accelerator.h ('k') | views/background.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698