Index: ash/wm/frame_painter.h |
diff --git a/ash/wm/frame_painter.h b/ash/wm/frame_painter.h |
index 5be8ca14652a5b4b6a14dde0657dabac4b1f5976..c4624014442a445b1895e0a7232a7e28f144e2b1 100644 |
--- a/ash/wm/frame_painter.h |
+++ b/ash/wm/frame_painter.h |
@@ -8,15 +8,20 @@ |
#include "ash/ash_export.h" |
#include "base/basictypes.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/base/animation/animation_delegate.h" |
+#include "ui/gfx/rect.h" |
class SkBitmap; |
namespace gfx { |
class Canvas; |
class Font; |
-class Rect; |
class Point; |
class Size; |
} |
+namespace ui { |
+class SlideAnimation; |
+} |
namespace views { |
class ImageButton; |
class NonClientFrameView; |
@@ -29,7 +34,7 @@ namespace ash { |
// Helper class for painting window frames. Exists to share code between |
// various implementations of views::NonClientFrameView. Canonical source of |
// layout constants for Ash window frames. |
-class ASH_EXPORT FramePainter { |
+class ASH_EXPORT FramePainter : public ui::AnimationDelegate { |
public: |
FramePainter(); |
~FramePainter(); |
James Cook
2012/03/19 19:25:58
must be virtual, clang will complain
|
@@ -74,6 +79,9 @@ class ASH_EXPORT FramePainter { |
// |maximized_layout| appearance. |
void LayoutHeader(views::NonClientFrameView* view, bool maximized_layout); |
+ // Overridden from ui::AnimationDelegate |
+ void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
+ |
private: |
// Sets the images for a button base on IDs from the |frame_| theme provider. |
void SetButtonImages(views::ImageButton* button, |
@@ -98,6 +106,14 @@ class ASH_EXPORT FramePainter { |
const SkBitmap* header_left_edge_; |
const SkBitmap* header_right_edge_; |
+ // The bitmap last used for painting header. |
+ const SkBitmap* previous_theme_frame_; |
+ // The bitmap we are crossfading from. |
+ const SkBitmap* crossfade_theme_frame_; |
+ |
+ gfx::Rect header_frame_bounds_; |
+ scoped_ptr<ui::SlideAnimation> crossfade_animation_; |
+ |
DISALLOW_COPY_AND_ASSIGN(FramePainter); |
}; |