Index: ash/wm/frame_painter.h |
diff --git a/ash/wm/frame_painter.h b/ash/wm/frame_painter.h |
index 324db1012c5988b06ee6e637ee0e46713024e277..ca6b47b007b6a610b0151586d7d917c3dfaf40b1 100644 |
--- a/ash/wm/frame_painter.h |
+++ b/ash/wm/frame_painter.h |
@@ -11,6 +11,9 @@ |
#include "ash/ash_export.h" |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" // OVERRIDE |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/base/animation/animation_delegate.h" |
+#include "ui/gfx/rect.h" |
#include "ui/aura/window_observer.h" |
class SkBitmap; |
@@ -20,10 +23,12 @@ class Window; |
namespace gfx { |
class Canvas; |
class Font; |
-class Rect; |
class Point; |
class Size; |
} |
+namespace ui { |
+class SlideAnimation; |
+} |
namespace views { |
class ImageButton; |
class NonClientFrameView; |
@@ -36,7 +41,8 @@ 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 : public aura::WindowObserver { |
+class ASH_EXPORT FramePainter : public aura::WindowObserver, |
+ public ui::AnimationDelegate { |
public: |
// Opacity values for the window header in various states, from 0 to 255. |
static int kActiveWindowOpacity; |
@@ -98,6 +104,9 @@ class ASH_EXPORT FramePainter : public aura::WindowObserver { |
intptr_t old) OVERRIDE; |
virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
+ // Overridden from ui::AnimationDelegate |
+ virtual 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, |
@@ -131,6 +140,17 @@ class ASH_EXPORT FramePainter : public aura::WindowObserver { |
const SkBitmap* header_left_edge_; |
const SkBitmap* header_right_edge_; |
+ // Bitmap and opacity last used for painting header. |
+ const SkBitmap* previous_theme_frame_; |
+ int previous_opacity_; |
+ |
+ // Bitmap and opacity we are crossfading from. |
+ const SkBitmap* crossfade_theme_frame_; |
+ int crossfade_opacity_; |
+ |
+ gfx::Rect header_frame_bounds_; |
+ scoped_ptr<ui::SlideAnimation> crossfade_animation_; |
+ |
DISALLOW_COPY_AND_ASSIGN(FramePainter); |
}; |