Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / panels / panel_bounds_animation.h
bloba4da9d14f77d6ddf69f347e6bac0edda06e53269
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BOUNDS_ANIMATION_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BOUNDS_ANIMATION_H_
8 #include "ui/gfx/animation/linear_animation.h"
10 namespace gfx {
11 class AnimationDelegate;
13 class Panel;
15 class PanelBoundsAnimation : public gfx::LinearAnimation {
16 public:
17 PanelBoundsAnimation(gfx::AnimationDelegate* target,
18 Panel* panel,
19 const gfx::Rect& initial_bounds,
20 const gfx::Rect& final_bounds);
21 ~PanelBoundsAnimation() override;
22 double GetCurrentValue() const override;
24 // Static because it is reused on Mac to override NSAnimation's calculation.
25 static double ComputeAnimationValue(double progress,
26 bool for_big_minimize,
27 double animation_stop_to_show_titlebar);
29 protected:
30 void AnimateToState(double state) override {}
32 private:
33 Panel* panel_; // Weak, owns us.
34 bool for_big_minimize_;
35 double animation_stop_to_show_titlebar_;
37 DISALLOW_COPY_AND_ASSIGN(PanelBoundsAnimation);
40 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BOUNDS_ANIMATION_H_