OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_SLIDE_ANIMATION_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_SLIDE_ANIMATION_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "ui/base/animation/slide_animation.h" |
| 10 |
| 11 namespace ui { |
| 12 class AnimationDelegate; |
| 13 } |
| 14 class Panel; |
| 15 |
| 16 class PanelSlideAnimation : public ui::SlideAnimation { |
| 17 public: |
| 18 PanelSlideAnimation(ui::AnimationDelegate* target, |
| 19 Panel* panel, |
| 20 const gfx::Rect& initial_bounds, |
| 21 const gfx::Rect& final_bounds); |
| 22 virtual ~PanelSlideAnimation(); |
| 23 virtual double GetCurrentValue() const OVERRIDE; |
| 24 |
| 25 // Static because it is reused on Mac to override NSAnimation's calculation. |
| 26 static double ComputeAnimationValue(double progress, |
| 27 bool for_big_minimize, |
| 28 double animation_stop_to_show_titlebar); |
| 29 private: |
| 30 Panel* panel_; // Weak, owns us. |
| 31 bool for_big_minimize_; |
| 32 double animation_stop_to_show_titlebar_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(PanelSlideAnimation); |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_UI_PANELS_PANEL_SLIDE_ANIMATION_H_ |
OLD | NEW |